diff --git a/packages/app-store/salesforce/lib/CrmService.ts b/packages/app-store/salesforce/lib/CrmService.ts index 8cb1f54e737c9c..fedfd14231b536 100644 --- a/packages/app-store/salesforce/lib/CrmService.ts +++ b/packages/app-store/salesforce/lib/CrmService.ts @@ -230,14 +230,14 @@ export default class SalesforceCRMService implements CRM { // User has not configured "Allow Users to Relate Multiple Contacts to Tasks and Events" // proceeding to create the event using just the first attendee as the primary WhoId return await this.salesforceCreateEventApiCall(event, { - WhoId: firstContact, + WhoId: firstContact.id, }).catch((reason) => Promise.reject(reason)); } log.error(`Error creating event: ${JSON.stringify(reason)}`); // Try creating a simple object without additional records return await this.salesforceCreateEventApiCall(event, { - EventWhoIds: eventWhoIds, + WhoId: firstContact.id, ...(ownerId && { OwnerId: ownerId }), }).catch((reason) => { log.error(`Error creating simple event: ${JSON.stringify(reason)}`);