Home > MS CRM 4.0 > Error : The specified type was not recognized: name=’new_group’, namespace=’http://schemas.microsoft.com/crm/2007/WebServices’, at .

Error : The specified type was not recognized: name=’new_group’, namespace=’http://schemas.microsoft.com/crm/2007/WebServices’, at .


 
This morning i got frustrated with error message "The specified type was not recognized: name=’Name_customentity’, namespace=’http://schemas.microsoft.com/crm/2007/WebServices&#8217;, at <BusinessEntity xmlns=’http://schemas.microsoft.com/crm/2006/WebServices’&gt;." When try to use QueryByAttribute to retrieve Custom entity. The query i was trying to excute is as follows
 

QueryByAttribute query = new QueryByAttribute();

query.EntityName =

‘Name_customentity’;

query.ColumnSet =

new ColumnSet();

query.Attributes =

new string[] { "new_AttributeName" };

query.Values =

new string[] { "4041" };

BusinessEntityCollection resultGroup = Instance().RetrieveMultiple(query);

The issue with above code is that , when you try to use querybyattribute with RetriveMultiple Method , the CRM tries to find strongly typed class of custom entity

as i was not using web reference the strong typed class wont exists .Thats the reason it was throwing error.

The solution for this issue is very simple , just create RetrieveMultipleRequest and set ReturnDynamicEntities = true

RetrieveMultipleRequest request = new RetrieveMultipleRequest();

request.ReturnDynamicEntities =

true;

request.Query = query;

 

Advertisements
Categories: MS CRM 4.0
  1. May 2, 2013 at 4:56 am

    I’m extremely inspired together with your writing talents as neatly as with the layout on your blog. Is that this a paid subject matter or did you modify it yourself? Either way keep up the excellent quality writing, it is uncommon to see a great blog like this one today..

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: