Home
> CRM 2011, Plug-Ins > “Object of type can not be converted to type ‘IBusinessEntity’ ” exception with crm Early Binding
“Object of type can not be converted to type ‘IBusinessEntity’ ” exception with crm Early Binding
Hi,
You may come across below exception in Plug-Ins, while performing Create/Update operation using CRM early binding
Exception: Unhandled Exception: System.InvalidOperationException: Object of type ‘entity_name‘ can not be converted to type ‘IBusinessEntity’
Fix :-
- You need to add below line in your Plug-in project’s “AssemblyInfo.cs” file (Navigate to project folder and go to ..\Properties\AssemblyInfo.cs)
[assembly: Microsoft.Xrm.Sdk.Client.ProxyTypesAssemblyAttribute()]
- Clean and Rebuild the solution
- Register the plug-in assembly
Hope it helps 🙂
Hi,
I’m using genrated proxyclass (via CrmSvcUtil.exe) as linked dll. It works fine in plugin, but in workflow throws the same exeption mantioned above.
plugin dll, workflow dll and dll containing proxy classes are in the same directory.
Any suggetion?
Thans
Marek
Thanks a lot Rajeev Pentyala.
You saved me
Hi,
Same error happens during workflow custom activity execution as well, though I added the assembly entry in workflow project as well.