You need to sign in to do that
Don't have an account?

Merge fields on the email template for approval comments
Hi there, I have an approval process and in this approval process I have added an email template with merge fields (ApprovalRequest.Comments) for comments and this template I have used in the final rejection action as an email alert but when I receive the email, I get this field value as blank even though the user has entered the comment, I did also search and found that
ApprovalsIf the email template you choose contains approval merge fields named{!ApprovalRequest.field_name}, these fields will return values only when that email template is used as the approval assignment template. If you use the template for any other email alert action—in either workflow rules or approval processes—the merge fields will return a null value.
Any help/comments on this is greatly appreciated
Thanks
Pradeep
Hi all, Hopefully this might help someone, As per salesforce support, We won be able to capture the approval/rejection comments in the email text template using the merge fileds.
Since this was need for me to get done, I did it using the Visualforce Email template.
Thanks
Pradeep
All Answers
Hello Pradeep,
The {!ApprovalRequest.Comments} merge field can be used in any approvals-related email alert from Salesforce Winter'14 Release.
Previously, all approval merge fields named {!ApprovalRequest.field_name} returned values only when used in an
approval assignment email template. When used in templates for other email alert actions—in workflow rules or approval
processes—the approval merge fields returned null.
Example : if a request is rejected at any approval step, you can include the approver’s rejection comment in an email
alert to the submitter.
Note: The {!ApprovalRequest.Comments} merge field returns only the most recently entered comment in
emails for an approval step that requires unanimous approval from multiple approvers.
Thanks,
Amit Shingavi
Hi all, Hopefully this might help someone, As per salesforce support, We won be able to capture the approval/rejection comments in the email text template using the merge fileds.
Since this was need for me to get done, I did it using the Visualforce Email template.
Thanks
Pradeep
Hi Pradeep,
Can you share how you got the Approval Comments within the Visualforce template?
Hi there, Sure why not, I had to make a component, Apex controller and an visualforce email template.
1. Apex class
Component:
Template
Hope it helps!
Prady
Thanks,
*____________________________________________________________
Jarrod Kingston *