Because some users may query the database directly using our Apex interface, Omnata has provided access to our multi-currency handling classes for Apex users.
These take the form of global classes that can be invoked from code outside of the managed package.
The following classes are used to carry currency-rated data. They are used in place of the standard sObjects (CurrencyType, DatedConversionRate) since these objects may or may not exist depending on the Org configuration.
Contains logic for handling various multi-currency scenarios.
Returns a omnata_sf.ConversionRate object, containing the conversion information for the provided currency code, at the provided effective date.
This information will come from the DatedConversionRate Salesforce object.
Example usage (assumes existing multi-currency configuration in Salesforce):
omnata_sf.ConversionRate rate = omnata_sf.CurrencyHelper.getDatedExchangeRate('USD', Date.valueOf('2021-08-01');
Returns a omnata_sf.ConversionRateAtDate object, containing the conversion information for the provided currency code
This information will come from the CurrencyTypeSalesforce object.