Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

Migration product catalog fails with "TooManyConditionsInQuery"

(0) ShareShare
ReportReport
Posted on by 595

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

  • KoJaPD Profile Picture
    595 on at
    Re: Migration product catalog fails with "TooManyConditionsInQuery"

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

     

  • cchannon Profile Picture
    4,702 Super User 2025 Season 1 on at
    Re: Migration product catalog fails with "TooManyConditionsInQuery"

    Interesting. Can you provide the query?

  • KoJaPD Profile Picture
    595 on at
    Re: Migration product catalog fails with "TooManyConditionsInQuery"

    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 Super User 2025 Season 1 on at
    Re: Migration product catalog fails with "TooManyConditionsInQuery"

    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?

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 69 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 51 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 35 Super User 2025 Season 1

Overall leaderboard