How to Make a Business Process Flow Driven Form in Dynamics 365

Using Business Process Flow is a good way of walking users through a process step by step. Each Stage contains steps which are just fields necessary to complete the stage. But there are times where displaying only fields for each stage doesn’t offer users clear instructions on what information is necessary to complete the stage.

So, the solution is to divide all the form controls necessary to aid users in completing a stage into tabs/sections and display these when the user has changed or selected a stage. This can be achieved by using JavaScript to apply display logic to tabs/sections base on the addOnStageChange and addOnStageSelected events of the Business Process Flow.

To demonstrate this, I will use the purchase process which we are all familiar with on most e-Commence websites when purchasing goods and services.
1.    Define the stages of the Process

Details -> Order -> Shipping Details –> Completed

This indicates that four tabs would need to be created on the Form

 
2.    Place sections, fields and sub-grid controls in each tab which is specific for a stage

image thumb How to Make a Business Process Flow Driven Form in Dynamics 365

3.    OnLoad of the Form firstly hide all tabs then setup the StageChange and StageSelected events of the Business Process Flow to execute the stageSelected function.

image thumb 1 How to Make a Business Process Flow Driven Form in Dynamics 365

StageChange
event happens when the user clicks on the “Next Stage” or “Back Arrow” button

image thumb 2 How to Make a Business Process Flow Driven Form in Dynamics 365

StageSelected
event happens when the user clicks on a Stage
  image thumb 3 How to Make a Business Process Flow Driven Form in Dynamics 365

image thumb 4 How to Make a Business Process Flow Driven Form in Dynamics 365

4.    User starts off with the Detail Stage, so the Details Tab is shown
image thumb 5 How to Make a Business Process Flow Driven Form in Dynamics 365
  image thumb 6 How to Make a Business Process Flow Driven Form in Dynamics 365
5.    User clicks the Next Stage to move to the Order Stage, so the Order Tab is shown

image thumb 7 How to Make a Business Process Flow Driven Form in Dynamics 365

image thumb 8 How to Make a Business Process Flow Driven Form in Dynamics 365

In conclusion, grouping fields and controls into tabs and sections and implementing JavaScript to display the tabs and sections results in a Form driven by the Business Process Flow.

Let’s block ads! (Why?)

Magnetism Solutions Dynamics CRM Blog