1

I have triggered an Email alert when Status is changed, LastModifiedBy date is changed and it works - every time there is a change in any of the fields on a ticket, emails are sent to Owner and Requester.

However I want the email template to include the fields that have been changed, during the last modification that triggered the email. Is there a way to do this?

I Have created a Workflow rule with Email alert. Below is my email template:

Email Template

Workflow rule for email alert

1 Answer 1

2

No. If you need this level of complexity, you'll want to write a trigger, instead. The reason why is that you need to be able to "see" the old and new values at the same time, and email alerts can't see the old values. This would actually be pretty simple as a trigger.

3
  • Thank you. Do I have to have History turned on on all fields on the form in order for the Trigger to work? I have never wrote a code for a trigger. Jan 24, 2020 at 13:09
  • @MiraCheytanova No. You'll need to do some research to get there, but in a trigger, you have "Trigger.old" that contains the values before the user saved, and "Trigger.new" that contains the values after the user saved. You can use this information to determine which fields changed, and compose an email accordingly.
    – sfdcfox
    Jan 24, 2020 at 14:11
  • Thank you so much for the help, I will play around with it and see how it is done. Jan 24, 2020 at 18:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .