Authored by Zishan Razzaq

Monday, July 30, 2012

How to get the latest Case Comment on an Email Template/Alert

Hi everyone:

Recently, I was asked on how would one get the most latest case comment onto a Email Template for an Email alert to go out.
Of course as you know if you place in {!CaseComment.Comments} it will not work. No such thing.
So how do you do get the case comments to show in a email alert.

Solution:
Step 1:
   Create a new field on the Case Object. Name it whatever you want and make sure it is Text Area(Long) as an attribute for the field.

Navigate to:
Setup | App Setup | Customize | Cases | Fields | New Field
Create your new field make sure you select Text Area(Long) for the attribute.




Step 2:
Create a workflow rule off the Case Comment Object to update the new field.
Navigate to:
Setup | App Setup | Create | Workflow Rules & Approvals | Workflow Rules | New Rule



  1. Select Case Comment as the object
  2. Place in the Rule Name
  3. Select the first option:
  4. When a record is created, or when a record is edited and did not previously meet the rule criteria
  5. For criteria:
  6. Case Comment: Body is not equal to null

Click Save & Next.
Under Workflow Action Click on Field Update.
Place in a Name.
Field to Update, Select Case Object and select the new field that was created in Step 1.
Select Use a formula to set the new value
Place in the formula:
 CommentBody 
Click Save.
Click Done and Activate.
Final view of your workflow rule should look like:

Go to an existing case, create a new case comment.
The workflow rule should fire and update the new field.

Step 3:
   Now that we know it is working, lets go to an email template.

Place it the new field from the case object within that email template.

Now if you have an existing workflow rule that does Email alert as an workflow action for that rule, you should receive the latest comments on that email template now.


Thank you
I hope this helped.
Watch Me Fight 
Join My Facebook on Cage Assassin Fight Gear 
Like my fan page Cage Assassin Fight Gear 




9 comments:

  1. This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck. lenzuola matrimoniali

    ReplyDelete
  2. cheap oakley sunglasses, combining elegant style and cutting-edge technology, a variety of styles of cheap oakley lifestyle sunglasses, the pointer walks between your exclusive taste style.

    ReplyDelete
  3. I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge. I truly adored reading your posting. Thank you! jewelry store in phoenix az

    ReplyDelete
  4. Thank you so much for giving this workaround.

    ReplyDelete
  5. Security phoenix az
    If you are looking for top Manpower Security Services & Security Guards in Phoenix. So you are at right place. We are the best security services that is the right choice for you.

    ReplyDelete
  6. Phoenix security
    If you are looking for top Manpower Security Services & Security Guards in Phoenix. So you are at right place. We are the best security services that is the right choice for you.

    ReplyDelete
  7. Phoenix security services
    If you are looking for top Manpower Security Services & Security Guards in Phoenix. So you are at right place. We are the best security services that is the right choice for you.

    ReplyDelete
  8. phoenix security
    If you are looking for top Manpower Security Services & Security Guards in Phoenix. So you are at right place. We are the best security services that is the right choice for you.

    ReplyDelete