Authored by Zishan Razzaq
Showing posts with label Workflow Rule. Show all posts
Showing posts with label Workflow Rule. Show all posts

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 




Sunday, March 4, 2012

Organization-Wide Email Addresses - Addressed

Scenario:
A workflow rule had an email alert that the users were getting with my email address as me being the sender so the from box.
Even when the workflow rule email alert states current email address that it comes from.
The users wanted it coming from a special mailbox that was set up for them.
The way to resolve this by Organization-Wide Email Addresses.

Solution:
Step:
 1. You must establish a from email address first.
Go to Setup | Administration Setup | Email Administration | Organization-Wide Email Addresses


     













2. Click Add button, Fill out the Display Name, Email Address and select either all profiles can utilize this email within the email alerts or only selected profiles. I have selected all profiles.
3. Once you click on Save,  it will send out a verification email to make sure that the email is valid. You shall see the message within the Status box, just as so:

4. If this is for the business, the owner of that mailbox needs to validate the email by clicking out the link. Once verified they will get a thank you message just like so:

5. Once Verified, the Status will change to "Verified".

6. Now you can go into the workflow rule, Email alert and utilize this email for the from Email Address Dropdown.

That is it...
Hope this helps
Thanks
Zishan R.

Watch Me Fight 
Join My Facebook on Cage Assassin Fight Gear 
Like my fan page Cage Assassin Fight Gear