How to Configure Conditional Workflows in D365FO?

How to Configure Conditional Based Workflow in D365FO? 

Introduction: When configuring workflows in D365FO, a conditional decision is a crucial element that allows the workflow to branch into different paths based on specific criteria. This feature enhances the flexibility and efficiency of workflow processes. To set up a conditional decision, you’ll need to access the workflow editor. Here’s how to configure the properties for a conditional decision effectively. 

Scenario: In a custom project form, the user requires that after the admin approves the workflow, it must also be approved by the manager, but only when the approval Enum field ‘Assigned to’ is set to “Manager.” This ensures that both levels of oversight are maintained for the project approval process. 

High level resolution steps 

    • Access the Workflow Editor: Log in to the workflow editor. 
    • Add Approval Step: Drag and drop the approval step again to the workflow. 
    • Set Up Manager Hierarchy: Configure the user or role that you want to designate as the manager. 
    • Define Condition: Go to the conditions section and add the necessary field name and value. 
    • Select Version: Click “OK” and ensure you select the latest version of the workflow. 
    • Submit the Workflow: Set the Enum field to “Manager” and submit the workflow. 
    • Verify Approval Flow: Check that the approval request is directed to the manager after the admin’s approval. 

    Detailed resolution steps 

      Step 1: Log in to the workflow editor & drag and drop the approval step again to the workflow. 

      Step 2: Configure the user or role that you want to designate as the manager. Here I am setting ‘Alicia’ who is considered as Manager.

      Step 3: Go to the conditions section, select ‘Run this step only when the following condition is met’ and add the necessary field name and value. In this example, I am taking ‘Assigned to’ field and value as ‘Manager’. 

      Note: We can add multiple conditions as per the requirement. 

      Step 4: Click “Save and close” and ensure you select the latest version of the workflow.

      Output 

        Scenario 1: 

        Create record in Project information custom form, fill ‘Assigned to’ field as ‘Manager’ and submit the workflow. 

        After Admin approval, work item assigned to Manager. You can check the workflow history, pre-condition approval evaluated to True. So, workflow not completes with Admin, it gone to the next step for Manager approval. 

        Scenario 2: 

        Create record in Project information custom form, fill ‘Assigned to’ field as ‘Team lead and submit the workflow. 

        You can check the workflow history, pre-condition approval evaluated to False. So, workflow completion with Admin not go to the next step for Manager approval.