Skip to main content

Notifications

Microsoft Dynamics AX forum

an exchange rate could not be found for iso currency code usd and cad on the following date

Posted on by Microsoft Employee

I try to import new exchange rates but I get a long list of warnings/errors, an d at the end it says no exchange rates have been imported.

i will post some screenshots of how my exchange setup looks like.

Screenshot_5F00_4.jpg

When I try to open the ServiceURL in my browser I get an error 404. (www.nationalbanken.dk/.../valutakurser.xml)

Screenshot_5F00_5.jpg

*This post is locked for comments

  • Ludwig Reinhard Profile Picture
    Ludwig Reinhard Microsoft Employee on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    Hello Veer,

    You replied to a very old thread that is most probably related to a different system version.

    Can you please create a new one and provide some information on your system version, your Oanda integration and the error message that you receive.

    Also, please let us know when you see this error message.

    Many thanks,

    Ludwig

  • veeru ogu Profile Picture
    veeru ogu 3,851 on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    Hi All,

    Even i am getting the same error, i am using Oanda service.

    Please let me know, if anyone fixed already.

    Regards,

    Veer

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    Hello Mahyar,

     

    were you able to resolve the issue? we are using Oanda Fx service, we were getting the exchange rates into our system AX 2012 R3 and all of a sudden we have this error 

    74348.Capture.PNG

    I executed the code in a Job and can see that the response is coming in with the rates.

    any help would be appreciated,

    Thanks. 

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    This is the XML file:

    <exchangerates xmlns:xsi="www.w3.org/.../XMLSchema-instance" type="Valutakurser" author="Danmarks Nationalbank" refcur="DKK" refamt="1">
    <dailyrates id="2015-09-16">
    <currency code="AUD" desc="Australske dollar" rate="475,92"/>
    <currency code="BGN" desc="Bulgarske lev" rate="381,48"/>
    <currency code="BRL" desc="Brasilianske real" rate="172,97"/>
    <currency code="CAD" desc="Canadiske dollar" rate="501,51"/>
    <currency code="CHF" desc="Schweiziske franc" rate="681,81"/>
    <currency code="CNY" desc="Kinesiske Yuan renminbi" rate="104,30"/>
    <currency code="CZK" desc="Tjekkiske koruna" rate="27,57"/>
    <currency code="EUR" desc="Euro" rate="746,10"/>
    <currency code="GBP" desc="Britiske pund" rate="1026,77"/>
    <currency code="HKD" desc="Hongkong dollar" rate="85,74"/>
    <currency code="HRK" desc="Kroatiske kuna" rate="98,51"/>
    <currency code="HUF" desc="Ungarske forint" rate="2,393"/>
    <currency code="IDR" desc="Indonesiske rupiah" rate="0,0460"/>
    <currency code="ILS" desc="Israelske shekel" rate="171,26"/>
    <currency code="INR" desc="Indiske rupee" rate="10,00"/>
    <currency code="ISK" desc="Islandske kroner *" rate="-"/>
    <currency code="JPY" desc="Japanske yen" rate="5,5083"/>
    <currency code="KRW" desc="Sydkoreanske won" rate="0,5656"/>
    <currency code="MXN" desc="Mexicanske peso" rate="39,92"/>
    <currency code="MYR" desc="Malaysiske ringgit" rate="156,97"/>
    <currency code="NOK" desc="Norske kroner" rate="80,76"/>
    <currency code="NZD" desc="New Zealandske dollar" rate="421,50"/>
    <currency code="PHP" desc="Filippinske peso" rate="14,25"/>
    <currency code="PLN" desc="Polske zloty" rate="177,77"/>
    <currency code="RON" desc="Rumænske lei" rate="168,55"/>
    <currency code="RUB" desc="Russiske rubel" rate="10,11"/>
    <currency code="SEK" desc="Svenske kroner" rate="80,01"/>
    <currency code="SGD" desc="Singapore dollar" rate="474,44"/>
    <currency code="THB" desc="Thailandske baht" rate="18,47"/>
    <currency code="TRY" desc="Tyrkiske lira" rate="221,36"/>
    <currency code="USD" desc="Amerikanske dollar" rate="664,50"/>
    <currency code="XDR" desc="SDR (Beregnet **)" rate="934,79"/>
    <currency code="ZAR" desc="Sydafrikanske rand" rate="49,74"/>
    </dailyrates>
    </exchangerates>


    And this is my Classdeclaration in AX:

    [ExchangeRateProviderAttribute,
     ExchangeRateProviderIdAttribute('DBA0440A-9462-48DA-AA70-D87453C0BECC')]
    class NCExchangeRateProvider_DA_NABANK extends ExchangeRateProvider
    {
        TransDate       onlyRatesDate;
    
        #define.DKK('DKK')
        #define.configurationServiceURL('ServiceURL')
    
        #define.dataSegmentNodeName('exchangerates')
        #define.dateSegmentNodeName('dailyrates')
        #define.rateSegmentNodeName('currency')
        #define.exchangeDateNodeName('id')
        #define.exchangeNameNodeName('desc')
        #define.exchangeISONodeName('code')
        #define.exchangeRateNodeName('rate')
        
          #define.ServiceCurrentURL('www.nationalbanken.dk/.../CurrencyRatesXML')
    }


    Maybe something is wrong in my classdeclaration, but I cant see what it could be.


  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    Hi André

    my provider is created in X++ by extending the ExchangeRateProvider class

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,807 Super User 2024 Season 2 on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    Hi Mahyar,

    The change was done in Visual Studio as the problem was related to the ECB provider which was built in .NET. Is your provider created in x++ or using .NET?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    Can I ask you which class/form you did modify to solve the problem?

  • André Arnaud de Calavon Profile Picture
    André Arnaud de Cal... 290,807 Super User 2024 Season 2 on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    Hi Mahyar,

    Or you try to import exchange rates on a date in a weekend or the service cannot connect to the internet. At a customer we had the same experience where a user on the AOS was able to open the web URL, but still the service raised an error. It appeared that the AOS service account did not have internet access due to proxy settings. AX is not proxy aware. We modified the coding of the exchange rate provider to provide login details so it could pass the proxy server.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    Hi Martin

    the service returns the correct exchange rates when I try it in the browser. But it seems that AX doesnt read them correctly.

  • Martin Dráb Profile Picture
    Martin Dráb 229,135 Most Valuable Professional on at
    RE: an exchange rate could not be found for iso currency code usd and cad on the following date

    Inbound ports are used for exposing AX services to other applications, which is completely opposite to what the import does. It can't help you in any way.

    Instead, ensure yourself that the service returns correct data (namely rates for USD and CAD). If not, they obviously can't be imported. If they're there, debug the code that import it to AX.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

News and Announcements

Give Back to the Community this Month

Quick Links

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,807 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,135 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans