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

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

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

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 I would say, we can do…

Blog Syndicated with Gopinath’s Permission

Author: Gopi Nath

Share This Post On

SCOTtish summit 2021

On February the 27th Scottish Summit 2021 will come to you as a virtual event. With over 250 sessions from all Microsoft technologies. You need to register for your FREE ticket and download the Scottish Summit App to see all the great sessions.