+ Start a Discussion

Logged email tasks shared among all Contacts that were emailed?

Hello everyone,

If a logged email was sent to three different email addresses (as an example), we'd like to have a trigger that associates that Task to all three Contacts in Salesforce. I know we can manually associate a Task to multiple Contacts, but is this possible to do in Apex automatically? And if so, how would I go about writing the Name field to hold multiple Contacts?

Best Answer chosen by ChickenOrBeef
Hi Greg, check out this object: https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_taskrelation.htm 

This could be the object you would need to insert the records to ? 

ps: If your question/problem is resolved/answered, please mark your post as 'Solved' so that community can benefit by resolved posts.