Quantcast
Channel: Super Feed from MSCRM Technical Insight by Jonathan Nachman
Viewing all articles
Browse latest Browse all 130

InvalidOperationException: The specified type was not recognized: name='entitymap'

$
0
0

I recieved this message when buiiding a Query Expression on the EntityMap entity for a custom solution.

It turns out that the entitymap entity is not contained within the Crm SDK dlls i was using, the workaround is to treat that entity as a dynamic entity and cast in once recieved.

i.e.

            QueryExpression query = new QueryExpression();

            query.EntityName = EntityName.entitymap.ToString();

            query.ColumnSet = new AllColumns();

             RetrieveMultipleRequest retrieve = new RetrieveMultipleRequest();

            retrieve.Query = query;

            retrieve.ReturnDynamicEntities = true;

             ConditionExpression condition1 = new ConditionExpression();

            condition1.AttributeName = "userqueryid";

            condition1.Operator = ConditionOperator.Equal;

            condition1.Values = new object[] { queryid.ToString() };

Enjoy

Jonathan


Viewing all articles
Browse latest Browse all 130

Trending Articles