2
votes

I'm relatively new to using the Web API (HTTP REST API) to access Dynamics CRM using javascript so I apologise in advance if this is a stupid question.

We've recently upgraded from v8.2 online to v9.0. Does this mean that I have to parse the js code library that we have and change code such as the one below from v8.2 to v9.0?

req.open("GET", encodeURI(clientUrl + "/api/data/v8.2/accounts?$select=name&$filter=contains(name,'" + strSearch + "')"));

I did perform some preliminary searches but wasn’t able to locate anything that answers my question.

3

3 Answers

3
votes

Not required. As far as I know, D365 9.x releases will support v8.0 Web API unless there is a change in plan for future releases. There are minor changes between the two. For example, if attribute name is same as entity name, v9.x API will not append '1' to the attribute name as v8.x API used to be. In fact, you are required to retest your JavaScript client in case you ever move to v9.0. CRM will otherwise try its best to ensure that backward compatibility is not broken with v8.x APIs.

1
votes

Better to do one time refactoring to use Xrm.Page.context.getVersion, this way the version will be dynamic in supported way.

0
votes

Probably.

Go to Developer Resources within CRM. (Settings > Customisations > Developer Resources).

You can then see the API endpoints for your organisation.

enter image description here