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

Adding a sent email to Activity History in a Custom Object



I need a little help with a trigger I am working on.  I created a trigger that would send an email if the status on an object was changed to completed.  I am trying to get this email to show up in the Activity History.  Could someone explain a good way to do this?  I'm getting confused on how the email should be attached to this object.  


I'm thinking that Task.ID should somehow be connected with the the Domain__c.ID.  I'm just not sure how.


Any help would be greatly appreciated.