If you have worked with integrations creating records for Dynamics 365 for any period of time you know one thing – Record creation can be slow.
When you are using Microsoft Flow to create several records in D365 the Flow UI defaults to a sequential process. However, this can cause long running times. To speed up the process you can use the Parallel Branch feature that was introduced in April 2017.
The other day I was setting up a new Flow to create a Contact and Account and then set the Primary Contact on the Account record along with parenting the Contact with the Account. I also needed to create some additional related records for the Contact. All this information was coming from an Excel file.
In the interest of setting this up to run efficiently, I wanted to use several parallel branches in sequence, grouping the actions into their logical steps.
BUT, I ran into an issue, it seems you cannot currently in the UI add a parallel branch immediately after another parallel branch. While this may be technically possible to set it up in Logic Apps, the Flow UI doesn’t support it. Hopefully, this is something that could be supported in the future. In the interim the work around is to insert a ‘Do Nothing’ action like a Compose.
Check out the screen shots below.
Here is the initial setup where I have configured one Parallel Branch to create the two base records – Account and Contact
Now I would like to put the three following actions into their own Parallel Branch. However, there is no Add Parallel Branch choice when trying to add the action immediately after the preceding Parallel Branch.
This can be solved by inserting a “Do Nothing” action after the Parallel Branch which will then allow you to select Add Parallel Branch after the ‘Do Nothing’ action. Using Compose is a good choice for the do nothing step because in this context it will do nothing and this action is very lightweight.
Now the Add a parallel branch feature appears.
Bingo! Now build out the second parallel branch. Rinse and repeat as necessary.