In this post, we will look at how conditional branching works with Business Process Flows in Dynamics 365.
Let’s create a new BPF:
We will call it Account Conditional Flow, and run it on the account entity:
Let’s create a new Stage. Rename it to Stage1:
And we will create add a new condition by clickind Add Condition, then selecting the + sign next to the Stage:
We see our condition appears:
Let’s set the condition to be, when Address 1: City field = New York:
Now let’s add Stages to decide what to do if the city is New York or not:
We will create 2 stages:
- City is New York
- City is not New York
We will add the Account Name as the step of each stage in the Business Process Flow. In a given scenario, you would want to add a meaningful field for the branch of the business process flow. E.g .if City is New York, display New York City taxes field:
For the step in Stage 1, we will use City. Note, when you create a condition, it can only use steps from the previous stage:
Save the BPF and ensure the new BPF is turned on.
Now create a new Account. As soon as New York is entered as the City and the field is tabbed off, the BPF stage changes to show City is New York:
If we change the city to something else, the Business Process Flow is automatically redrawn: