Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Can I increase the maximum number of conditions for FetchXML query Bulk Workflow tool XrmToolBox

Posted on by 190

Hi,

I need to run a workflow on approx 6000 records using the Bulk Workflow execution tool in the XrmToolBox but I am getting the message that I have exceeded the maximum number of conditions. I have seen somewhere that the max number allowed is 500. Is there a way to increase this to do all 6000?

This is for an D365 online instance.

Many thanks

Phil

*This post is locked for comments

  • fillcrocker Profile Picture
    fillcrocker 190 on at
    RE: Can I increase the maximum number of conditions for FetchXML query Bulk Workflow tool XrmToolBox

    Hi Pawel,

    I have been given a list of just over 6000 crm accounts but the data has come from another application that in the form of a excel spreadsheet. The primary key is a whole number field. I cannot filter the accounts on any other value so can't get a view of all the records from CRM. I decided to paste the values of the field into a modified FetchXml query. See example:

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">

     <entity name="account">

       <attribute name="primarycontactid" />

       <attribute name="telephone1" />

       <attribute name="tradingname" />

       <attribute name="accountid" />

       <order attribute="primarycontactid" descending="false" />

       <filter type="and">

         <filter type="or">

           <condition attribute="registrationnumber" operator="eq" value="4025504" />

           <condition attribute="registrationnumber" operator="eq" value="5011793" />

           <condition attribute="registrationnumber" operator="eq" value="3040794" />

           <condition attribute="registrationnumber" operator="eq" value="3643804" />

         </filter>

       </filter>

     </entity>

    </fetch>

    Regards

    Phil

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Can I increase the maximum number of conditions for FetchXML query Bulk Workflow tool XrmToolBox

    Hi,

    Since this is online version, you may try to raise a ticket with Microsoft to increase the numbers for you or

    you can create your own console application and using paging or cookies to

    retrieve more records and call the workflow.

    Make sure you create the workflow as on demand workflow

    1.  Paging with fetchxml

    msdn.microsoft.com/.../gg328046.aspx

    2. Execute workflow

    msdn.microsoft.com/.../microsoft.crm.sdk.messages.executeworkflowrequest.aspx

  • Suggested answer
    Rawish Kumar Profile Picture
    Rawish Kumar 13,756 on at
    RE: Can I increase the maximum number of conditions for FetchXML query Bulk Workflow tool XrmToolBox

    it will run on the desired records, if your fetch XML or view returns 6000.

  • tw0sh3ds Profile Picture
    tw0sh3ds 5,600 on at
    RE: Can I increase the maximum number of conditions for FetchXML query Bulk Workflow tool XrmToolBox

    Why do you need to have this 6000 conditions? Can't you build the condition that will select all the records that you need? If no - then how do you know which 6000 records do you need to run the workflow for?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans