Get Api Version in JavaScript for WebApi Requests – Dynamics 365 CE

Gopi NathDyn365CE4 years ago7 Views

Hi Everyone,

Today I was reviewing the code that was written an year ago and in most of the places I have seen the code like below.

req.open("GET", Xrm.Page.context.getClientUrl() + "/api/data/v9.1/accounts(3851da21-5ae9-ea11-a817-000d3a5308e0)?$select=accountid,accountnumber,name", true);

If you observe that Version has been hard corded in the request, even though it works perfectly…

Continue Reading Gopinath’s Article on their blog

https://staturestack.com/2020/09/27/get-api-version-in-javascript-for-webapi-requests-dynamics-365-ce/

Blog Syndicated with Gopinath’s Permission

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
February 2025
MTWTFSS
      1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28   
« Jan   Mar »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...