The currency format switch (\#) formats numeric Salesforce fields, such as revenue, amounts and prices, as currency values in your document. Use it so financial figures look consistent and follow professional and regional standards.

Syntax

{{Object.Field \# FormatPattern}}
{{Object.Field \# Currency}}

Values

ValueEffect
A number pattern, such as #,##0 or $#,##0.00Formats the number exactly as the pattern shows: thousand separators, a symbol, and the decimal places written after the point.
CurrencyLocale-based currency formatting. It uses the org-level locale by default, unless you override it with a CurrencyCulture parameter.
A culture name, such as CurrencyCulture1Formats with the culture defined on the solution. See CurrencyCulture.

Where to add it

Add \# and the pattern after the field name inside the merge field in your Word template.

Example

Input: an account whose Annual Revenue is 125000.

FormatSyntaxOutput
Number with thousand separator{{Account.AnnualRevenue \# #,##0}}125,000
USD with no decimals{{Account.AnnualRevenue \# $#,##0}}$125,000
USD with two decimal places{{Account.AnnualRevenue \# $#,##0.00}}$125,000.00
Locale-based currency formatting{{Account.AnnualRevenue \# Currency}}₹1,25,000.00 (if the IN locale is set)

Works in

Word (DOCX) templates: the examples on this page are Word template fields.

Notes

  • The Currency keyword uses the org-level locale by default, unless you override it with the CurrencyCulture parameter.
  • To get the same formatting in every region, define the culture explicitly, for example CurrencyCulture1=de-DE for German euro formatting.

Common errors