Posts

Showing posts with the label CURRENCYRATE

Salesforce Fact #863 | Another POC using FormulaEvalInApex

Image
In order to fetch the currency conversion rate for a particular currency in Apex, we need to query CurrencyType or DatedConversionRate Sobject. We can make use of the FormulaEvalInApex feature to get the conversion rate using dynamic formula without the need of any SOQL. Attached is the screenshot.

Salesforce Fact #718 | CURRENCYRATE()

How to get the currency conversion rates in formula fields in a multi-currency org? We have a function called CURRENCYRATE() which can be used for this. It takes the CurrencyIsoCode as the input and returns the corresponding conversion rate with respect to the corporate currency. Reference:  https://help.salesforce.com/s/articleView?id=sf.customize_functions_currencyrate.htm&type=5