DYNAMICS 365 HOW TO EXECUTE WORKFLOW ON THOUSANDS/ALL RECORDS
Do you have a situation where you want to run a workflow for thousands or all records of an entity in Dynamics 365? If yes, then this post will help you to achieve it.
In CRM web client, you can run a on-demand workflows for only 250 records per entity, but, there is a workaround to overcome this limitation...
using "Bulk Workflow Execution" plugin in XrmToolbox.
Based on a FetchXml query, you can now use the "Bulk Workflow Execution" plugin to retrieve records from CRM/D365 entities, select a specific on-demand workflow,
and run the selected workflow on those records.
To accomplish this, you need to follow the below steps:
-
Create a on-demand workflow to retrieve the records based on your needs
For the sake of this demo, we will create a simple workflow on Account entity and add an Update step- Navigate to Settings > Processes > New
- Fill the needed details in the pop-up window
- In the design workflow, add an Update step for the account entity that will be applied on the records
- Once done, click Save and then Activate your workflow
-
Get the FetchXML query from the Advanced Find to retrieve the needed or all records
Click the Advanced Find button, design/build your query, and click on Download Fetch XML to get the FetchXML query
-
Configure the Bulk Workflow Execution plugin to run your workflow against your FetchXml query
- Open the XrmToolbox and search for Bulk Workflow Execution plugin
- Select the on-demand workflow created in Step 1 above
- Select the option Use Custom FetchXML Query
- Paste the FetchXML query copied from the Advanced Find above
- Click Validate Query to check the FetchXML query and correct it if any issues
- Click Start Workflows to run your workflow and process all the result set based on the FetchXML query provided
Hope This Helps!
Comments
Post a Comment