Wednesday, February 11, 2015

Real Time Exchange Rates using a Calculated Field in Dynamics CRM

Each currency field in Dynamics CRM actually consists of three fields the currency amount, the base currency amount  and the exchange rate. When a record with a currency field is saved the corresponding amount in the system's base currency is calculated using the current exchange rate and all three values are saved.

While this is fine for some scenarios where you want to stamp and lock the FX rate on the record it is not appropriate in others. A typical scenario is when you have multi currency opportunities and you want to report on these using the latest exchange rate. If you use the base amount then you will get the base currency value at the time the record was saved. Prior to the release of Dynamics CRM 2015 using the current exchange rate was difficult to achieve without custom code.