Salesforce Fact #602 | Filter on currency field for particular currencyisocode

We can filter records based on a currency field for a particular value of a currency in SOQL. 

For example, if we want to fetch the opportunity records whose amount is greater than the equivalent value of 500000 in EUR, we can use the below SOQL:

SELECT Id, Amount, CurrencyIsoCode FROM Opportunity WHERE Amount > EUR500000 LIMIT 3

It takes into consideration the currency conversion rate and fetches data accordingly.

Reference: https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_querying_currency_fields.htm

Attached is the screenshot.






Comments

Popular posts from this blog

Salesforce Fact #192 | Call batch apex from flow

Salesforce Fact #457 | Get current user role name in flow