0

Is it possible to re-format custom field values in a mail merge HTML template in Salesforce? Like to remove a dollar sign, or the cents in a dollar amount?

2 Answers 2

1

While it's not officially documented, I believe you can use many Visualforce functions in email templates. You just have to manually write the function syntax.

For example, the following plain text email template will produce the output shown in the preview below.

{!Contact.FirstName}
{!LOWER(Contact.FirstName)}
{!UPPER(Contact.FirstName)}

Contact Name email template preview

3
  • Oh hey, cool. So we can use like Math.round() to get rid of decimals? Stripping dollar signs would be tougher I'd imagine, though. Or converting dollar amounts to cents.
    – t56k
    Nov 23, 2015 at 12:12
  • 1
    Math.round() is an Apex method, not a Visualforce function. Unfortunately I've only seen the ability to use Visualforce functions, not Apex methods. As for stripping dollar signs you may have to create a formula field that simply displays the numeric value of the currency field, and use that formula field in your email template.
    – Marty C.
    Nov 23, 2015 at 12:31
  • FYI, using round works just fine.
    – t56k
    Nov 23, 2015 at 12:31
0

Whell, the real answer is NO, it is not possible for CUSTOM fields, it do is just for STANDARD fields.

1
  • 1
    Do you have a reference for this claim?
    – Adrian Larson
    Oct 18, 2016 at 23:39

You must log in to answer this question.

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