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
SudhanwaSudhanwa 

Case comments in my mail template

Hi,

 

I want to notify a certain public group whenever someone adds a comment to the case. I have a workflow rule in place which sends out a mail whenever the case is edited. In my mail template I want to display the comments also. Is this possible? If so, how?

 

Thanks,

Sudhanwa.

Best Answer chosen by Admin (Salesforce Developers) 
werewolfwerewolf
I believe so -- you can make a workflow email alert using that field from the Related Contacts section of the email alert setup.

All Answers

werewolfwerewolf

- Make a custom field on Case called "Last Comment"

- Make a Workflow on Case Comment that takes the body of the new comment and copies it to that Last Comment field

- Make a Workflow on Case which fires whenever that Last Comment field changes (using the ISCHANGED operator) which sends the email.

- In your email template, use that Last Comment field.

SudhanwaSudhanwa
Thanks Werwolf.

I need one more clarification. I have a custom field - a look up to contact called 'Assigned To' in Cases object. Its not a required field. Whenever the case owner selects a name for the field, I want a notification mail to be fired to that person's email and cc-ing some people. Is this achievable through workflow rule? If yes, how?
werewolfwerewolf
I believe so -- you can make a workflow email alert using that field from the Related Contacts section of the email alert setup.
This was selected as the best answer
SudhanwaSudhanwa

Thanks again.

 

One more...how can I cc people dynamically? I have this contact field as the person who reports the case. The case owner send a mail to a support team and wants to cc the contact. Is that possible as well?

 

Regards,

Sudhanwa.

werewolfwerewolf
I don't think Email Alert does CC, it only adds addresses to the To address.
SudhanwaSudhanwa
Oh ok. Any workaround which you can think of?
werewolfwerewolf
You could do something with an Apex trigger on Case instead of a workflow.  That's the only workaround.