CRM Dynamics 365 Online – Issues with running workflows for large amounts of data

Posted by:

|

On:

|

,

I recently came across an instance where I was required to run a custom workflow against thousands and thousands of records, and I was surprised to find out that there isn’t any out of the box way of doing this with CRM Dynamics 365 Online. If you use advanced find or a view, you are able to run a workflow on multiple records, but you can only do this for 250 records at a time. This can be quite time consuming, if you need to run a workflow on thousands and thousands or records.

Luckily, I was able to find a nice way of dealing with just such a situation, that is quite straightforward, and can be done quickly, in just a few simple steps.

1.) Create a new boolean field on the entity you want to run the workflow on. In my case I called it “RunWorkflow” and you can either default all values to NULL

2.) Create a trigger condition on the workflow you want to run, that runs the workflow whenever this new field “RunWorkflow” is updated.

3.) Using advanced find, query all of the records you want to run the workflow for and export to Excel. Make sure your new column “RunWorkflow” is in your View so that you can update it in Excel.

Once you are in Excel, you can set the field “RunWorkflow” to ‘YES’, save the Excel file and Import it back into CRM. This will update all of the records you want to run the workflow for and trigger the workflow.

And just like that, the workflow will run for as many records as you want. This method has saved me a lot of headaches in the past, and its still my go to way of achieving this goal. If anyone has any other methods of achieving the same goal, I’d love to hear them, so let me know!