I am trying to implement the currency exchange rate business process as outlined in this article. I have done everything according to the instructions, but for some reason when I run the business process it is not updating the exchange rates correctly.
After a lot of trial and error, it appears that somewhere not in my business process it is doing the calculation
1 / exchangeRate
and entering that into the exchange rate instead of just the exchange rate.
For example, with the base currency set to euro, the call to the API responded with "AUD":1.646885, but after the business process finishes, the exchange rate says it is 0.60720694 for AUD:
Picture of the relevant business process element:
Is there an explanation as to why this could be happening?
Like
Hello!
The Exchange rate column in the Currency object is virtual, so it is not shown in the Lookup and cannot be edited directly from the Lookup.
The Rate itself is saved in the CurrencyRate table with a link to CurrencyId each time it is changed.
The base stores the inverse of the exchange rate. For example:
Base currency: EUR
AUD exchange rate: 0.60720694
Which is inconvenient to understand, so a Lookup with a more user-friendly currency display, but converting to a reverse exchange rate, has been developed to support backward compatibility.
This way you can enter the usual exchange rate of EUR = 1.646885 (AUD to EUR) on the interface. And the base will already save 0.60720694 (EUR per 1 AUD).
These different types of rate (1.646885 and 0.60720694 ) will determine the formula by which you will then calculate the amounts.:
1) convert it to a familiar rate - 1/0.60720694 = 1.646885.
2) either work already with 0.60720694 , but then the calculation of the amount will be different.
So, the Rate column is virtual, but you can use CurrencyRate (exchange rate) to calculate the exchange rate.
Kyrylo Atamanenko,
What is the reasoning behind storing the exchange rates in such a manner? Why isn't this mentioned in any articles?
Also, you mention a more user friendly lookup has been developed; is this new lookup implemented in 8.1.5, or is this an upcoming feature?