web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Migration product cata...
Power Apps
Unanswered

Migration product catalog fails with "TooManyConditionsInQuery"

(0) ShareShare
ReportReport
Posted on by 599

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...

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    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?

  • KoJaPD Profile Picture
    599 on at

    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

  • cchannon Profile Picture
    4,702 Moderator on at

    Interesting. Can you provide the query?

  • KoJaPD Profile Picture
    599 on at

    @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>

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 445

#2
WarrenBelz Profile Picture

WarrenBelz 386 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 321 Super User 2025 Season 2

Last 30 days Overall leaderboard