New Condition Operators in Microsoft Dynamics CRM 2015

Roshan Mehta, 18 September 2014

With the introduction of the new hierarchies feature in Microsoft Dynamics CRM 2015 comes new condition operators that can be used with the ConditionOperator enumeration in the C# SDK as well as FetchXML queries. These new operators are intended to support records that are related via the new Hierarchies feature of Dynamics CRM 2015. Some operators include recursion limits to mitigate performance issues when running queries.

Above

Returns all records above the referenced record in the hierarchy. The FetchXML equivalent is above. This query has a recursion limit of 100.

AboveOrEqual

Returns the referenced record and all records above it in the hierarchy. The FetchXML equivalent is eq-or-above. This query has a recursion limit of 100.

Under

Returns all records under the referenced record in the hierarchy. The FetchXML equivalent is under. This operator has a recursion limit of 10.

UnderOrEqual

Returns the referenced record and all records below it in the hierarchy. The FetchXML equivalent is eq-or-under. This operator has a recursion limit of 10.

NotUnder

Returns all records not below the referenced record in the hierarchy. The FetchXML equivalent is not-under. This operator has a recursion limit of 10.

Important: Please note that this blog was written during the Dynamics CRM 2015 Preview Release Program. At the time of writing, only the Under and Not Under operators were available inside Advanced Find, so this may change with the final release. Also note that the OData endpoint has not been updated to support querying of hierarchical data.

New Condition Operators in Microsoft Dynamics CRM 2015