XRMServiceToolkit is not working as Expected after upgrading MS Dynamics CRM 2015 to 2016

1.8k Views Asked by At

I have upgraded MS CRM 2015 to 2016 and it is working fine. We are using XRMServiceToolkit(2.2) javascript library to fetch data from server.

The main problem is we are getting logical name in name attribute and logical name is blank, whereas earlier we use to get value of the field in name attribute and field name in logical name. Please refer the screenshot for better understanding. Below is the screenshot from MS CRM 2016 : enter image description here

Below is the screenshot from MS CRM 2015 : enter image description here

I have searched online but couldn't find anything related to this. I tried making change in the library but it lands up into other errors. If I check the XML response from the server in 2015 :

<b:value i:type="a:EntityReference">
<a:Id>0698841a-e9cf-e511-9420-fcaa14b7a801</a:Id>
<a:LogicalName>ccs_category</a:LogicalName>
<a:Name>MORTGAGE</a:Name>
</b:value>

in 2016 :

<b:value i:type="a:EntityReference">
<a:Id>0698841a-e9cf-e511-9420-fcaa14b7a801</a:Id>
<a:KeyAttributes xmlns:c="http://schemas.microsoft.com/xrm/7.1/Contracts" />
<a:LogicalName>ccs_category</a:LogicalName>
<a:Name>ORGANIZATION</a:Name>
<a:RowVersion i:nil="true" />
</b:value>

I think this could be a reason for this problem but I don't know how to resolve it.

1

There are 1 best solutions below

0
On

I hope you've solved this issue.

I will post the answer for everyone else who might be experiencing this issue.

As stated in the project description page, since Dynamics CRM 2015 Update 1, you should use the 2.2.1 version of the library. This is the link to the download page: XrmServiceToolkit v2.2.1. Also keep in mind this issue. I don't know if the publisher has already solved it.

Last but not least, you should keep in mind that from Dynamics CRM 2016, the OData endpoint has been deprecated (it still works but will stop working in future releases) and the supported way to query OData endpoint is through the Web API.

You can find a starting point to query CRM data here.

Cheers.