Omnata Product Documentation
  • Omnata Sync for Snowflake
    • What is Omnata Sync for Snowflake?
    • How it works
      • Terminology
      • Branching Mode
      • Sync Directions and Strategies
        • Outbound
        • Inbound
      • Rate Limiting
      • Access Control
      • Notifications
      • Security and Privacy
      • Internal tables
      • Internal Stored Procedures
      • FAQ
    • Step-by-step guides
      • 1. Install the Omnata Sync Engine
      • 2. Install the Omnata Plugin
      • 3. Configure the Plugin
      • 4. Create a connection
      • 5. Create a sync
    • Apps
      • Aerobotics
        • 📘Release History
      • Airtable
        • 📘Release History
      • Amazon Ads
        • Privacy Notice
      • ApprovalMax
        • 📘Release History
      • Bamboo HR
        • 📘Release History
      • Clockify
        • 📘Release History
      • Contentful
        • 📘Release History
      • GitHub
        • 📘Release History
      • Github
      • Google Ads
        • 📘Release History
      • Google Sheets
        • 📘Release History
      • HubSpot
        • 📘Release History
      • Hubspot
      • Infor Data Lake
        • 📘Release History
      • Jira
        • 📘Release History
      • LinkedIn Ads
        • 📘Release History
      • Mailgun
        • 📘Release History
      • Marketo
        • 📘Release History
      • Meta Marketing
        • 📘Release History
      • Microsoft Ads
        • 📘Release History
      • Microsoft Dynamics 365 Business Central
        • 📘Release History
        • 📘Release History
        • 📘Release History
        • 📘Release History
        • 📘Release History
      • Microsoft Entra ID
        • 📘Release History
        • 📘Release History
        • 📘Release History
        • 📘Release History
      • Microsoft Excel
      • Microsoft SQL Server
        • 📘Release History
      • Monday.com
        • 📘Release History
      • MRPeasy
        • 📘Release History
      • PayHero
        • 📘Release History
      • Pinterest Ads
        • Privacy Policy
      • PostgreSQL
        • 📘Release History
      • Salesforce
        • Salesforce Permissions needed
        • Formula Fields
        • How we use the Salesforce APIs
        • 📘Release History
      • Salesforce Marketing Cloud
        • OAuth for APIs, SFTP for file transfer with GPG on outbound
        • OAuth for APIs, SFTP for file transfer
        • OAuth for APIs, Cloud Storage for file transfer
        • 📘Release History
      • Shopify
        • Outbound sync data structures
        • 📘Release History
      • Slack
        • 📘Release History
      • Tiktok Ads
        • Privacy Policy
      • Typeform
        • 📘Release History
      • Wise
        • 📘Release History
      • Xero
        • 📘Release History
      • Zendesk Support
        • 📘Release History
        • 📘Release History
    • Plugins
      • Anatomy of a Plugin
      • Example Plugins
        • Example Plugin: Slack
        • Example Plugin: Zoho CRM
      • Creating Plugins
      • Advanced Plugin topics
        • Advanced rate limiting / concurrency
        • Custom Jinja filters
        • Custom Record Transformers
        • Dynamic Configuration Forms
        • Test case generation
    • Branching
      • Inbound Sync branching
      • Outbound Sync branching
    • Integrations
      • dbt
        • Validation Tests (coming soon)
    • 📘Release History
  • Omnata Connect for Salesforce
    • Overview
    • Getting Started
      • Install the Salesforce App
      • Connect to your data warehouse
        • Snowflake
        • BigQuery
        • Rockset
        • Firebolt
        • SingleStore (previously MemSQL)
      • Deciding which mode to use
    • Omnata with Salesforce Connect (External Objects)
      • Object Configuration
      • View your data in a list
      • Link to other objects
      • Use in a Report
      • Database schema changes
      • Writing to External Objects
    • Omnata with Salesforce Lightning Components
      • Object Configuration
      • View your data in a list
      • Link to other objects
      • Using the Lightning Component on a page
      • Assigning Permissions
    • Advanced Features
      • Row Level Filtering
      • Multi-Currency handling
        • About Multi-Currency
        • Support in Omnata Connect
        • Apex Features
    • Integrations
      • Datadog
    • Omnata with Salesforce Apex
    • Security
    • Use cases
      • Linked object drill-downs
      • Global Search
      • ERP and historical data
      • Embedded product metrics
    • Best Practices
      • Global Search
      • Change Management
      • Snowflake table design
      • Salesforce page layout
      • Salesforce Caching
Powered by GitBook
On this page
  • Data Classes
  • omnata_sf.ConversionRate
  • omnata_sf.ConversionRateAtDate
  • Helper Classes
  • omnata_sf.CurrencyHelper
  1. Omnata Connect for Salesforce
  2. Advanced Features
  3. Multi-Currency handling

Apex Features

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.

Data Classes

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.

omnata_sf.ConversionRate

Field name
Type
Description

conversionRate

Decimal

The rate, relative to the corporate rate

decimalPlaces

Integer

The number of decimal places

omnata_sf.ConversionRateAtDate

Field name
Type
Description

conversionRate

Decimal

The rate, relative to the corporate rate

decimalPlaces

Integer

The number of decimal places

startDate

Date

The start date of this rate’s effective period

nextStartDate

Date

The date of the day after this rate’s effective date finishes

Helper Classes

omnata_sf.CurrencyHelper

Contains logic for handling various multi-currency scenarios.

getDatedExchangeRate(String currencyCode, Date effectiveDate)

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');
System.assertEquals(Decimal.valueOf('0.70'),rate.conversionRate));

getExchangeRate(String currencyCode)

Returns a omnata_sf.ConversionRateAtDate object, containing the conversion information for the provided currency code

This information will come from the CurrencyTypeSalesforce object.

PreviousSupport in Omnata ConnectNextIntegrations

Last updated 3 years ago