Weekly exchange rate update

Weekly exchange rate update
1 vote, 5.00 avg. rating (97% score)

I was asked by a customer if there is an easier way to import exchange rates.

This is a time-consuming task to have to do this manually for multiple currencies and multiple NAV companies.

So I found an XML feed of the European Central Bank which I started playing around with.

The link we need is the following: http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml

In this feed, which is updated daily, we can find the rate of different currencies compared to the euro.

Below you find the code which is able to read the feed into variables.

and these are the variables:

The code will read through the currencies and save the Value Date, Currency Code and rate.

The actual importing still needs to be done.

 

Weekly exchange rate update
1 vote, 5.00 avg. rating (97% score)

6 thoughts on “Weekly exchange rate update

  1. Pingback: Weekly exchange rate update | Pardaan.com

  2. When I use this code in NAV2015 (or NAV2013), I get the following error when I try to save the codeunit :

    —————————
    Microsoft Dynamics NAV Development Environment
    —————————
    You cannot create an Automation object “XMLDoc” on Microsoft Dynamics NAV Server. You must create it on a client computer.

    —————————
    OK
    —————————

    Is there an example present for this currency import on NAV2015?

    Thanks.

Leave a Reply