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

Value cannot be null. Parameter name: item

$
0
0

Hi All,

We are using Dynamics CRM  and we try to retrieve values with the query.
Time to time we are receiving an error message like "Value cannot be null. Parameter name: item".
What we noticed is that this error occur either in context.OrganizationService.RetrieveMultiple(...) or context.OrganizationService.Retrieve(...) methods.
This methods are part of Microsoft.Xrm.Sdk.IOrganizationService:

Example of the code where the error occur: 

                    EntityCollection results = context.OrganizationService.RetrieveMultiple(
                        new QueryExpression
                        {
                            EntityName = Contact.EntityLogicalName,
                            ColumnSet = new ColumnSet(Contact.Fields.CustomField),
                            Criteria =
                            {
                                Filters =
                                {
                                    new FilterExpression
                                    {
                                        FilterOperator = LogicalOperator.And,
                                        Conditions =
                                        {
                                            new ConditionExpression(Contact.Fields.ContactId, ConditionOperator.Equal, contactId),
                                        }
                                    }
                                }
                            },
                        }
                    );



LogTrace:


Any inputs will be highly appreciated.

Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>