web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / CRM TIPS By PRM / Error: Object of type ‘Micr...

Error: Object of type ‘Microsoft.Xrm.Sdk.Entity’ cannot be converted to type xxx + Dynamics 365

P. R. M Profile Picture P. R. M 739

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.

Comments

*This post is locked for comments