For the complete documentation index, see llms.txt. This page is also available as Markdown.

How To: Format Currency Values

Learn how to format currency amounts with symbols, separators, decimals, and related list columns.

You can format currency output directly in merge fields and related list columns.

Problem

You need to display monetary values with currency symbols, thousands separators, and decimal places.

Solution

For US Dollar formatting:

${{!Opportunity.Amount format-number="#,###.##"}}

Result: $4,222,300.80

For Euro formatting (European style):

€{{!Opportunity.Amount format-number="#.###,##"}}

Result: €4.222.300,80

For British Pounds:

£{{!Opportunity.Amount format-number="#,###.##"}}

Result: £4,222,300.80

Format all prices in a product table:

<!--{{!
<lineitems>
<listname>opportunitylineitems</listname>
<column>PricebookEntry.Product2.name</column>
<column prefix="$" format-number="#,###.##">unitprice</column>
<column>quantity</column>
<column prefix="$" format-number="#,###.##">totalprice</column>
</lineitems>
}}-->

Tips

  • Add the currency symbol directly before the merge field. It is not part of the attribute.

  • Use #,###.## for US and UK style.

  • Use #.###,## for European style.

  • The pattern works for numbers of any size.

  • Values round when precision exceeds two decimal places.

Last updated

Was this helpful?