الأربعاء، 29 يناير 2014

CRM 2011 : unable to cast object of type 'microsoft.xrm.sdk.entity' to type 'xrm.account'

To Solve it

Use enableProxyTypes method on your Organization Service proxy to fix it, here is the sample for generating organization service proxy properly:

OrganizationServiceProxy orgService = new OrganizationServiceProxy(organizationUri, homeRealmUri, credentials, null);
 orgService.EnableProxyTypes();

 orgService.Authenticate(); 
 IOrganizationService _service = (IOrganizationService)orgService;

ليست هناك تعليقات:

إرسال تعليق