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?
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)}
-
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. – okay56k Nov 23 '15 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 '15 at 12:31 -
Whell, the real answer is NO, it is not possible for CUSTOM fields, it do is just for STANDARD fields.
-
1