Error: Object of type ‘Microsoft.Xrm.Sdk.Entity’ cannot be converted to type xxx + Dynamics 365
Views (1470)
Error Message:
While retrieving or updating data into CRM using LINQ, CRM will show below exception:
Exception Type: ArgumentException
Message: Object of type ‘Microsoft.Xrm.Sdk.Entity’ cannot be converted to type ‘XXX’.
Solution:
We need to add below line while creating Organization Service for Dynamics 365.
serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
This was originally posted here.

Like
Report
*This post is locked for comments