Retrieve Exchange Rate Action

How to retrieve exchange rates for QuickBooks Online accounts enabled with multi-currency.

Updated over a week ago

The Retrieve Exchange Rate action will return an exchange rate (compared to the company's home currency) when given a currency code and a date. This exchange rate can then be used in an action such as Calculate Currency Conversion.

Note: Even though it may be visible on your account, this action will only work on QuickBooks Online with Multi-Currency enabled.


Parameters

Description

Currency

This is the currency code of a customer to compare the home currency to. You can find this in the Customer table, using the display of the Currency field.

Using this Date

Exchange rates change all the time. Specify the date of exchange, usally the transaction date.

Where to store the exchange rate.


Example

To see this used in practice, check any Method transaction page on a multi-currency enabled QuickBooks Online account. You will find this action in the control fncCheckMultiCurrency.

In the below example, we will use a custom transaction screen to demonstrate this action. (This screen does not exist in your account and used for example only.)

This screen will have the following fields:

  • Customer: When a user selects a customer, then this action wil run.

  • TxnDate: When the transaction occured.

  • Currency: The customer's currency code will be placed in this dropdown, which has the Currency table as a base table.

  • ExchangeRate: The exchange rate will be placed in this field.

  • Amount: The exchange rate will be applied to this amount.

The below actions would be placed in the Customer's Change Event. Only when a customer exist can Method calculate the exchange rate.

  1. First, retrieve the currency code from the customer using Retrieve Values From Table and place it into the onscreen Currency dropdown field. Note the display of the Customer's currency field is retrieved, not its Record ID:

  2. Now we can use Retrieve Exchange Rate. Taking the currency code retrieved above and the Transaction Date (TxnDate) we can get the exchange rate and place it into the onscreen ExchangeRate control.

  3. Using the action Calculate Currency Conversion, we can now convert the value in the onscreen Amount field and place it into an action result of our choice:

Did this answer your question?