2

I have a rejection notification email template that is using the merge field '{!ApprovalRequest.Comments}' to display the rejection comments as entered by the user.

The rejection comments are displayed just fine until the user enters some text in the comments while rejection.

The problem is when the user leaves the field blank. The system is picking up comments from the previous step and adding that to the email. Can someone please help?

Below screenshot shows the approval history. I have left the rejection comments as blank. In the email, the merge field shows 'Submitted for approval' as the comments.

enter image description here

4
  • shouldn't your second sentence read: The rejection comments are displayed just fine WHEN the user enters some text in the comments while REJECTING. ?
    – cropredy
    Aug 14, 2014 at 18:12
  • 1
    You could always customize the email template and include a formula: {!IF ApprovalRequest.Comments = 'Submitted for approval',NULL,ApprovalRequest.Comments)} to mask the spurious comment
    – cropredy
    Aug 14, 2014 at 18:14
  • thanks crop1645. that worked perfect. wasnt sure if we could include formulas in the email template. Aug 15, 2014 at 4:07
  • cool, i converted to an answer
    – cropredy
    Aug 15, 2014 at 15:20

1 Answer 1

3

Although this is a bit of a hack, customize the email template and include a formula:

{!IF ApprovalRequest.Comments = 'Submitted for approval',NULL,ApprovalRequest.Comments)} 

to mask the spurious comment. Formulas within email templates can do useful stuff that would otherwise require adding formula fields or using a VF custom controller.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .