Re: Create one Task for an Account when emails have been sent to all Contacts under the Account

Justin_Donlon
Level 2

Create one Task for an Account when emails have been sent to all Contacts under the Account

We would like to create just ONE Task related to an Account where we have sent Market Emails to the contact under the account - we do not want to create a task PER contact.

Any ideas on how to achieve this would be most appreciated!

Thank you!

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Create one Task for an Account when emails have been sent to all Contacts under the Account

Can't be done out-of-the-box.

Also note you have a race condition in your proposal: at the time you're checking if a Contact represents the last one awaiting an email reachout, other Contacts could be added to an Account, making the Account-Wide Alert Task immediately obsolete.

One custom approach that comes to mind: let all tasks be created, flip a Was Emailed flag on the contact, use Apex trigger to delete the Task before it comes to anybody's attention unless the Account has been fully emailed.

Justin_Donlon
Level 2

Re: Create one Task for an Account when emails have been sent to all Contacts under the Account

Thanks Sanford - yup makes sense!