Posts

Showing posts with the label currency

Salesforce Fact #750 | Multi-currency facts

Image
How to check if the current org is multi-currency enabled? There is a method called isMultiCurrencyOrganization() of UserInfo class which returns true or false accordingly. What is Parenthetical Currency Conversion? In multi-currency enabled orgs, Salesforce displays converted currency amounts in parentheses if the user's personal currency is different from the record's currency. The converted currency amount is considered as secondary and is shown in parentheses whereas the record's currency amount is shown in first place. In the attached screenshot, The record's currency is BRL and the user's personal currency is EUR. Reference:  https://help.salesforce.com/s/articleView?id=sf.admin_enable_multicurrency_implications.htm&type=5

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

Image
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.