Skip to main content

Single Currency Formatting

Artem Kniazev
Artem Kniazev

How to format currency strings on orgs where multi-currency is not enabled No multi-currency means that there is no CurrencyIsoCode field available
You still can do currency formatting right in the SOQL

Opportunity o = [SELECT FORMAT(Amount) AmountFormatted, Amount FROM Opportunity LIMIT 1];
System.debug(o.get('AmountFormatted')); // 1 200,00$
System.debug(o.Amount); // 1200.00

Use FORMAT with the SELECT clause to apply localized formatting to standard and custom number, date, time, and currency fields. https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_format.htm