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
crkdealcrkdeal 

displaying workflow email on related record

Hi there, I have a workflow rule that sends email to a contact. I'd love it if this activity was then logged on the contact record so that there would be a record of the email being sent. Is there any way to configure that in setup somewhere, or would this require Apex code? Thanks!

super developersuper developer

you need Apex code.

 

In trigger you can create activity for workflow..

 

 

skodisanaskodisana

Hi,

 

Unfortunetly salesforce will not track the Email alerts that are sent from Workflow.

Please follow the below scenario to do this.

 

To do this, have the Workflow trigger a task (in addition to the email alert that is sent). You can assign the task to the record owner, creator, a certain role, or a specific user. You can also set the task to "Completed" so it will just be used for tracking purposes. 
Once the Workflow is triggered, the email will be sent and a completed activity will be logged on that particular record simultaneously.

 

Thanks,

Kodisana

KD123456KD123456

Hi,

 

What Kodisana has suggested is the simplest workaround for your requirement. The other way is using APEX codes and Email services provided by SFDC.

 

  1. Enable the Email Services option
  2. Use the email id provided by the Email services in the BCC address in the email alert
  3. Write an APEX code that will help capture the email sent to the email services email Id and create an activity appropriately.

 

Thanks

KD