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