Find your content:

Search form

You are here

Workflow Rule on Case Comment, Fire Action on Case

 
Share

I would like to fire a workflow whenever a case comment is created that emails both the case owner and a custom lookup field on the Case Object. I've created one for new Cases fine but when I fire on Case Comments I'm unable to access fields on the Case object as email recipients.

Is there any way to do this with workflows or should I resort to using a trigger on CaseComment?


Attribution to: Venko

Possible Suggestion/Solution #1

You are right, you cannot directly do this via workflow.

Rather than resort to a trigger though, can I suggest the following approach.

Use a Workflow rule on Case Comment to enact a field update on the parent Case, which (ensuring you re-evaluate workflow afterwards) can then fire a Workflow rule on the Case (due to the update) that sends an e-mail out to the Case Owner and your custom field?!

diagram

Sounds complicated, but it's not, I promise.

If that "solution" is enough for you to follow through, then perfect, if not you can read/follow this blog post which I wrote to set a custom template, which uses this exact Workflow pair to send the Case owner an e-mail on Case Comment creation - just ignore the custom template bit and follow the additional field work and workflows to trigger the e-mail.

You need the new field and updates etc. on the Case so you only fire the "updated" workflow when it is a new Case Comment causing the update, and not just a user editing a case.


Attribution to: Simon Lawrence
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/34747

My Block Status

My Block Content