Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

HCLTech Microsoft Business Applications Practice Blog

for Dynamics 365, Power Platform and the rest of the Microsoft technology stack

Business Process Flows: Conditional AND Statements in Branching Logic

Post Author: HCLTech |

Branching logic in Business Process Flows are a great component to Dynamics CRM. However, there are a couple of tips and tricks to be aware of that will make using them easier. In today's blog, we will cover conditional AND statements in a branching logic scenario where more than one item in a branch needs to be verified. Let's dive in!

If you have an AND statement in your branching logic, it needs to come first in order for the rest of the Business Process Flow to function properly. The first example below is built so that it will NOT function correctly:

1. In the first branch, it is only verifying one field in the first stage of the Business Process Flow.

2. In the second branch, which is an "else" statement from the first branch, it uses an AND statement to verify two fields in the first stage of the Business Process Flow.

Now, if we look at the Business Process Flow in action and mark both Step 1 (Generic Business Process Field 1) and Step 2 (Generic Business Process Field 2) as Completed, according to the branching logic we built, the next stage should be Stage 2B. However, you can see that it did not change to Stage 2B, but instead went to Stage 2A despite both fields being marked Completed.

Now let's build it so that it will work correctly. First we need to change the order of the conditional statements:

1. Move the AND statement in the first branch.

2. Move the statement only verifying one field to the second branch.

You can see that if we just mark the Step 1 (Generic Business Process Field 1) as Completed, as expected, Stage 2A and Stage 3A appear as the next stages in the Business Process Flow:

Then, when we also mark Step 2 (Generic Business Process Field 2) as Completed, the next stage now correctly changes to Stage 2B.

There you have it! Hopefully this tip will help you build as many functioning Business Process Flows with branching logic as your heart desires! Did you know that PowerObjects offers several educational events and webinars on demand? Sign up for our newsletter so you can stay up to date with the latest and greatest PowerObjects offerings.

Until next time readers, happy CRM'ing!

By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

PowerObjects Recommends