Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

The 'RetrieveMultiple' method does not support entities of type 'none'.

$
0
0

In a QueryExpression I m trying to use Or operator and retrieve multiple records. When I ran my query it through below error:

The 'RetrieveMultiple' method does not support entities of type 'none'.

My code is as below:

public void Execute()
        {
            CrmConnection conn = new CrmConnection("CRMOnline");
            IOrganizationService org = new OrganizationService(conn);


            QueryExpression userQ = new QueryExpression()
            {

                Criteria =
                {
                    Filters = { 
                            new FilterExpression {
                             FilterOperator = LogicalOperator.Or,
                              Conditions = { 
                              new ConditionExpression("fullname",ConditionOperator.Equal,"Mian sb")
                              }
                            },
                            new FilterExpression {
                             FilterOperator = LogicalOperator.Or,
                              Conditions = { 
                              new ConditionExpression("fullname",ConditionOperator.Equal,"Papa Phindi")
                              }
                            },
                            new FilterExpression {
                             FilterOperator = LogicalOperator.Or,
                              Conditions = { 
                              new ConditionExpression("fullname",ConditionOperator.Equal,"Mai Lghoom")
                              }
                            }
                            
                             
                    }
                }
            };

            var results = org.RetrieveMultiple(userQ);




        }


Can you please suggest what I m doing wrong and what I should do to fix it ?

Please feel free to give any suggestion but since it is a demo for my learning I want to do it using QueryExpressin. 

Thanks a lot for your time and help.


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images