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