There has been some discussion about asking the salesforce.com team to include the CaseComment object in the “triggerable” list. After conferring with JP Seabury (ForceMonkey), we designed a Rube Goldberg-esque solution to the problem.
Whenever a user adds a comment to a case, add him/her to the Case Team.
Here it is, in general terms:
- Workflow on
- Email service parses
Case Comment Workflow
Use existing workflow functionality to send an email whenever a comment is added to a case.
- Template Includes:
- Case Id
- User Id
The recipient is an Apex email service that we can code using the Email to Idea example by Rasmus Mencke.
For more information on setting up the
, check the Apex documentation.
The class needs to add the User to the Case Team, which requires a few fields:
That’s it! The unique part of this is that we’re sending an email FROM Salesforce TO Salesforce.
Thinking outside the box – isn’t it more fun?