Ever wish you could use a workflow to update related/child records? For example, when I update the address on an account, update the address on all of the related contacts.
You can, with the help of the very helpful CRM 2011 Distribute Workflow Activity assembly written by Alberto Gemin on Codeplex.
While this says “CRM 2011” in the name, it works fine on CRM 2013 and CRM 2013 SP1.
- Import the solution from Codeplex
- Create your child entity workflow(s). In this example, create a workflow for the contact entity, check the box to run as a child workflow, uncheck the box to run on create of a record, and add your desired step.
- Create the master workflow that will trigger the child workflow. In this example it would be a workflow that runs on update of the address fields.
- Add a step. If you have successfully deployed the solution, you should see a new step called “DWF AG Utilities:Distribute One to Many.”
- In the step properties you need to specify two values: the database name of the 1:N relationship and the child workflow you created in step 2.
- Publish the workflow.
Now, every time the master workflow is executed, it will run the child workflow on each related record. This works with both background (asynchronous) and real-time (synchronous) workflow processes.