Hi,
I am trying to migrate data for a Dynamics 365 Sales product catalog from one environment to another.
I made a migration schema file with CRM Configuration Manager (v4.0.0.110 64bit) and tried to export the data from the source environment.
Whatever I try, even if I only select 2 fields (productid and nam) from the Products table (in which there are about 3500 products in the source environment), I get the error:
ApiOriginalExceptionKey : Microsoft.Crm.CrmException: Number of conditions in query exceeded maximum limit. ---> Microsoft.Crm.CrmException: Number of conditions in query exceeded maximum limit.
at Microsoft.Crm.Query.EntityExpression.FromSdkQueryVisitor.Visit(ConditionExpression condition)
...
ApiExceptionMessageName : TooManyConditionsInQuery
Is there any setting that I need to set to overcome this? If I use the same export schema on a smaller product catalog (from another source environment), with only around ten products, the export works fine...
@cchannon , here the *complete* XML file that is created...
<entities>
<entity name="product" displayname="Product" etc="1024" primaryidfield="productid" primarynamefield="name" disableplugins="false">
<fields>
<field updateCompare="true" displayname="Product" name="productid" type="guid" primaryKey="true"/>
<field displayname="Name" name="name" type="string"/>
</fields>
</entity>
</entities>
Interesting. Can you provide the query?
Hi @cchannon , the export schema (which is created by the CRM migration tool) does not include *any* filter, it only defines the fields (columns) that have to be exported/imported
the "number of conditions" refers not to the columns you select, but the conditions you put on the query ("XXX equals YYY"). Is your query especially complex in that regard?
WarrenBelz
69
Most Valuable Professional
mmbr1606
51
Super User 2025 Season 1
Michael E. Gernaey
35
Super User 2025 Season 1