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
krhkrh 

capture outbound email message sent date

Hi all,

I have requirement to build a report on task & events to show list of tasks which are closed with closed date. I have workflow to update closed date field when status is changed to completed. But for the task of type "Email"(outbound email message) this is not working.

Please help me to capture outbound email message sent date on task. I can do this only on case now.

Thanks in Advance.
NatalieFoleyNatalieFoley
Hi, you'll want to use the MessageDate field on the EmailMessage object. Referencing that will give you the date/time the email was sent. (Fyi, I think the timestamp is UTC, so depending on your time zone and when the email was sent, the message date may return tomorrow's date.)
EmailMessage | Object Reference for the Salesforce Platform | Salesforce Developers (https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_emailmessage.htm)