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.
I came across this post searching for this capability, but I also found another blog that actually gives the code for similar functionality:
I’d still recommend that people go to the above Codeplex site and download the step-by-step instructions, as it pertains to the use of this code as well.
Will this work with all 1:N relationships or only parental like Contact/Acct?
it will work for any 1:N relationship.
Have any of you ran into issues using this to send emails to all connections on a record? I have it set up according to directions, but I am receiving an error that the entity id does not exists
Connections are quite special as they are polymorphic. Without seeing the actual workflow it’s hard to tell what’s wrong.
I was pointed to this to solve one of my problems of sending emails via workflow to contacts in a sub-grid. I have Dynamics 365. Does anyone know if this plugin will work for my version?
Since the codeplex is shutdown, does anyone has a solution file?
firstly, the archive is still available on codeplex and, secondly, I’d advise to go for a more actively maintained option: Ultimate Workflow Toolkit.
will the Ultimate Workflow Toolkit work for all 1:N relationships?
I don’t have detailed knowledge of all toolkits out there. Some of them do have equivalent methods to the one described (which is now a bit old)
i can’t understand what the child workflow do?
The child workflow runs on the related records, e.g. you can run a specified child workflow on all the contacts of a specific account. The child workflow instances will run one-by-one. What does the child workflow do is totally up to you. You can send email, modify the records, etc, etc.
Hi, I have heard this functionality might be unstable when the number of related records is large (i.e. workflows might fail for a few related records). Is this also your experience?