Microsoft Dynamics NAV 2016 has a new feature where you can import currency exchange rates from an external service. You can then attach them to the Job Queue and have the currency rates imported into your company on a scheduled basis.
In Dynamics NAV’s Cronus database, a working example is already set up to connect to Yahoo’s Exchange Rate Service. However, most Canadian companies may not use this and would prefer to get the rates from the Bank of Canada.
I will walk you through setting up Bank of Canada as a Currency Exchange Rate Service in Dynamics NAV 2016.
1. Start Microsoft Dynamics NAV 2016 and go to Currency Exchange Rate Services.
2. You may see one already set up for Yahoo. Click on New to create a new one for Bank of Canada.
3. Enter in the Code and Description fields. I will be pulling in the noon rates from the Bank of Canada.
The Terms of Service field populates automatically from the Bank of Canada’s RSS feed.
4. For the next step, download the actual XML file from the Bank of Canada by pasting the URL into Internet Explorer, then save it to a folder on your computer. We will need this file in a step below.
5. In the Field Mapping fast tab, click on the Data Exchange Definition action.
6. In the Data Line Tag field, enter: /rdf:RDF/item/cb:statistics/cb:exchangeRate
7. Click on Get File Structure… Actions
8. Enter the Path and file name of the XML file downloaded from the Bank of Canada in Step 4.
9. Click OK.
10. Close the Data Exchange Definition page.
11. In the Field Mapping fast tab, enter the data as shown below. You can click on the AssistEdit button on the Source file to help populate the value.
12. You will see above that there is a Transformation Rule called FIRST_TO_THIRD_CHAR. This rule does not come as standard data and so will have to be created. The definition of this rule is shown as follows:
13. Click on the Preview action button to check the data that it receives. The preview will show how your data looks based on your setup. The currency exchange rates will not be updated.
14. Click on the Enable Field. This will create a Job Queue Entry to allow automatic updates. Click on No for now.
15. Close the Currency Exchange Rate Services card and go to your list of Currencies.
16. In the action pane, click on Update Exchange Rates. This will update the Currency Exchange Rate table with the new data from the Bank of Canada.
Finally, once you know that the currency update is working, you can schedule this in Microsoft Dynamics NAV’s job Queue area.