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)

For 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)

For example:

SELECT Id, convertCurrency(AnnualRevenue) FROM Account

Cheers!!!

No comments:

Post a Comment