You need to sign in to do that
Don't have an account?
John Gerhard
email message and task relationship trigger
Hello,
When a task is created I update a lookup field with the whoID if the whoID is a contact that is. However, when someone sends an email it does not fire the trigger. Apparently this is because it creates an object called EmailMessage and not just a Task, well it also creates a Task. The problem that arises is that when the task is created it is being done by an internal flow so it does not fire my trigger. Okay no problem, then I need to move my trigger to fire when the EmailMessage is created. Then I run into the issue of I don't know how to query for the task created that is associated with this email message to update the fields on the task accordingly. Any help would be much appreciated.
When a task is created I update a lookup field with the whoID if the whoID is a contact that is. However, when someone sends an email it does not fire the trigger. Apparently this is because it creates an object called EmailMessage and not just a Task, well it also creates a Task. The problem that arises is that when the task is created it is being done by an internal flow so it does not fire my trigger. Okay no problem, then I need to move my trigger to fire when the EmailMessage is created. Then I run into the issue of I don't know how to query for the task created that is associated with this email message to update the fields on the task accordingly. Any help would be much appreciated.
Also for whoever stumbles on this thread, the ActivityId field is not accessible through the process builder. You'll to access it via Apex or via the Flow Builder.