Note: Even though it may be visible on your account, this action will only work on QuickBooks Online with Multi-Currency enabled.
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.
- 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 - Considering exchange rates change, specify the date of exchange. Usually, this is the transaction date.
- Place the Value Here - Where you wish to store the exchange rate. It can be an action result or another control.
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: