Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

oData query raises an error when you use CRM Complex Type field as a condition


View products that this article applies to.

Symptoms

oData query raises an error when you use a complex type field as a condition.

The following query will raise an error:

XRMServices/2011/OrganizationData.svc/AccountSet?$select=Name&$filter=PrimaryContactId/LogicalName%20ne%20null

↑ Back to the top


Cause

This is a change from the Dynamics CRM 2011 beta release. In Dynamics CRM 2011 you cannot use complex type field as a condition. Please remove field name. For EntityReference, you are able to use Id field.

↑ Back to the top


Resolution

Replace the query with either of the following to resolve the issue.

XRMServices/2011/OrganizationData.svc/AccountSet?$select=Name&$filter=PrimaryContactId%20ne%20null

Or

XRMServices/2011/OrganizationData.svc/AccountSet?$select=Name&$filter=PrimaryContactId/Id%20ne%20null

↑ Back to the top


Keywords: kbmbspartner, kbmbsmigrate, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2500892
Revision : 1
Created on : 1/7/2017
Published on : 1/25/2011
Exists online : False
Views : 222