Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Unanswered

XMLHtttpRequest with sync mode

Posted on by 155

For Javascript we had XMLHtttpRequest since some time and now also have Xrm.WebApi for use with Web API.

Between the two XMLHtttpRequest with sync mode is very useful for short queries and we would like to keep using this to avoid complicated code and effort to make the change. In this context I wanted to know if anyone is aware if XMLHtttpRequest sync mode is planned to be deprecated and if we will be unable to use this in future. Any information or reference from MS regarding this will be helpful.

Thanks in advance.

  • bravoss Profile Picture
    bravoss 155 on at
    RE: XMLHtttpRequest with sync mode

    Do we also have some guidance from MS on this as I would assume quite a bit of the current JS code in crm would be using the sync method at least from my observation.

    Usually in crm a common use is to use Javascript and Web API to drive some form of UI display on form. In this case it makes less sense to only have an option of async and driven by promises ?

  • meelamri Profile Picture
    meelamri 13,198 User Group Leader on at
    RE: XMLHtttpRequest with sync mode

    Hi Bravoss,

    Technically, this is not related to Dynamics. XHR is part of the W3C standard. According to this standard, synchronous XHR is now in a deprecated state. It is recommended that developers move away from the synchronous API and use asynchronous requests instead.

    developer.mozilla.org/.../Synchronous_and_Asynchronous_Requests

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 228,645 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans