Executing Workflows for more than 250 Records in Microsoft Dynamics CRM 2011 (Updated)

Executing Workflows for more than 250 Records in Microsoft Dynamics CRM 2011 (Updated)

Sometimes we run into situations when we wished we had the chance to run a workflow for more than 250 records at a time. There are cases for example when you need to move data from one field to another within an entity or create a duplicate record of certain entity or any other scenario where processing mass amounts of data is required.

If you have ran into this scenario before you noticed that you could only run workflows for 250 records at a time since that is the limit of records you can have in a particular view. There was also a way to export all the data, make a change to certain field and re-import the data (as shown in this video: http://www.youtube.com/watch?v=nT8m6M4HFWg) to trigger a workflow that would fire upon field change but that takes some time to prepare and sometimes you can't agree on which field to change so you are forced to use a custom field or an unused field (that could be used later so you second-guess for a while).

Here is a quick way to solve this problem:

  1. Create a view with all the records that you intend to run the workflow for, you can use an existing view (I.E. Active Accounts) if that view includes all the records you are targeting, if not you can always create a personal view that contains all the target records. In this example I am using the "My Active Accounts" view.
  2. Navigate to the view within Microsoft Outlook and Pin the view:


    Once you pin the view you will notice that all records within that view will be displayed on a single (huge) page.

  3. Select all records and Run your Workflow:


  4. Click Ok and watch it run!


This "pinned views" approach can be used for other purposes, for example: Bulk Edit.

UPDATE #1: After receiving some comments and emails from people concerned about how many workflows could be submitted or executed in Microsoft Dynamics CRM Online, I decided to run a test with a larger amount of data. I ran a test for 20,000 records:


Microsoft Outlook took 38 minutes (Warning: You will be unable to do anything in Microsoft Outlook during this time) to submit the 20,000 workflows for execution in Microsoft Dynamics CRM Online and 1 hour and 52 minutes later all 20,000 workflows were completed without a single error. I am planning on running a workflow for 250,000 records overnight to further test the capabilities of this solution.

If you have any questions or are looking to upgrade to a new version of CRM contact us here.

 


Microsoft Dynamics CRM Blog, Microsoft Dynamics CRM Tech Blog