function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DTCFDTCF 

Task fields in Activity associated with sent email

I'm trying to set a custom field on a task that gets associated with a sent email:

 

mail.setSaveAsActivity(true);

 

How can I get a handle on that Task so that I can set the value of a field dynamically?

 

I was thinking that I could create a "hidden" field on the parent object that gets associated with the "whatid", and then add a trigger on a task, where it looks at its parent object. Would that work?

 

Thanks!