convertCurrency() in Salesforce

Use convertCurrency() in a SOSL query to convert currency fields to the user’s currency. This action requires that the organization is multi-currency enabled.

Syntax:

convertCurrency(Amount)

Example:

FIND {test} 
RETURNING Opportunity(Name, convertCurrency(Amount))

Use convertCurrency() in the SELECT statement of a SOQL query to convert currency fields to the user’s currency. This action requires that the org has multiple currencies enabled.

Syntax:

convertCurrency(field)

Example:

SELECT Id, convertCurrency(AnnualRevenue) 
FROM Account

Leave a Reply