Error while converting CRM 4.0 plugin into CRM 2011?
-
Monday, 6 June 2011 2:41 PM
Dear All,
I am getting following errors
CRMServices.QueryExpression query = new CRMServices.QueryExpression(); query.EntityName = entityName; query.ColumnSet = new AllColumns(); query.Criteria = filter; //I am getting Error below BusinessEntityCollection ret = service.RetrieveMultiple(query); return ret;
Error 4 Argument 1: cannot convert from 'CRMServices.QueryExpression' to 'Microsoft.Xrm.Sdk.Query.QueryBase'
Error 3 The best overloaded method match for 'Microsoft.Xrm.Sdk.IOrganizationService.RetrieveMultiple(Microsoft.Xrm.Sdk.Query.QueryBase)' has some invalid arguments
Can you please help me out.
Thanks and Regards,
Yusuf
All Replies
-
Monday, 6 June 2011 3:00 PMModerator
You are mixing the CRM4 and CRM2011 endpoint. You must remove all references to Microsoft.Crm.Sdk.dll (or the corresponding web service) in your project. (remove the using CRMServices namespace).
Gonzalo | gonzaloruizcrm.blogspot.com
- Marked As Answer by Jamie MileyMVP, Moderator Wednesday, 10 April 2013 3:28 PM
-
Monday, 6 June 2011 3:26 PMModerator
Also, I am not familiar with CRMServices. Is this a custom class? If so you may want to post that code so we can review that too.
Thanks,
Jamie Miley
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter! -
Friday, 8 June 2012 2:56 PMModeratorI guess looking again crmservices is what you named your web reference. Did you get this figured out?
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!