web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Exchange Rate Job Queue Error

(0) ShareShare
ReportReport
Posted on by

Hi, 

I have a bit of a problem with the a Job Queue to update Exchange Rate daily. It is working temperamentally and I don't know where to trace the source of the problem to, so any assistance would be greatly appreciated. 

When the Job Queue errors it comes up with this error: 

The remote service has returned the following error message:

Connection to the remote service could not be established.

The remote server returned an error: (400) Bad Request. 

Service URL: 

https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.xchange%20where%20pair%20in%20(%22AUDCAD%22,%22AUDCHF%22,%22AUDEUR%22,%22AUDGBP%22,%22AUDHKD%22,%22AUDJPY%22,%22AUDNZD%22,%22AUDSGD%22,%22AUDUSD%22)&env=store://datatables.org/alltableswithkeys


When this error occurs I can't even view the Currency Exchange Rate Service card for this service as it comes up with the error:

A call to System.Xml.XmlReader.Create failed with this message: The remote server returned an error: (400) Bad Request


This does not happen all the time and in testing it can error then 2 minutes later run fine, then error in 10 minutes. I don't really understand why it is being so unpredictable. Is this possibly a web service issue rather than a NAV issue. 

Any help appreciated. 

 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Tina Menezes Profile Picture
    2,582 on at
    RE: Exchange Rate Job Queue Error

    Hi,

    400 Bad request error is that the server which your trying to send some request must be probably incorrect and server cannot understand the request. Are you calling an external API or doing some real time integration by calling some web url?

    Due to some error or missing content in the other website server the request that you are trying to make through HTTP is failing. You need to check that. Also you need to check your customized code.

  • Suggested answer
    Rehan Satti Profile Picture
    634 on at
    RE: Exchange Rate Job Queue Error

    Hi Spinky,

    I have been playing with the web services. When you are calling web-service from dynamics NAV use Try Function. On function return parse the web-service response. You will find the status code. Like 200 in case of success, 400, when not found. So take appropriate action accordingly. In net shell you need to handle exception in C/AL.

    Have a look at this. link.

     http://vjeko.com/try-catch-in-cal/

    This is how i did.Try.png

  • Verified answer
    spinky Profile Picture
    on at
    RE: Exchange Rate Job Queue Error

    Thank you for the responses all. 

    It appears that the Yahoo Exchange Rate service has been discontinued so that's why it is no longer working! 

  • Suggested answer
    Zaid Tariq Profile Picture
    2,274 on at
    RE: Exchange Rate Job Queue Error

    So now you are using some other exchange service or what?

  • spinky Profile Picture
    on at
    RE: Exchange Rate Job Queue Error

    Not yet, we are suggesting the client use XE

  • Pravin.D Profile Picture
    12 on at
    RE: Exchange Rate Job Queue Error

    I am also using the same service not getting any error but exchange rate not updated on currency from 2nd of NOV. Can any provide us the link of yahoo or Microsoft for Yahoo Exchange Rate service has been discontinued from navision.

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

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#1
Alexander Ermakov Profile Picture

Alexander Ermakov 2

#3
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans