There may be cases where you need to set different Business Process Flow for different forms in an entity in Dynamics 365.
Maximum number of processes, stages, and steps
To ensure acceptable performance and the usability of the user interface, there are some limitations you need to be aware of when you plan to use business process flows:
- There can be no more than 10 activated business process flow processes per entity.
- Each process can contain no more than 30 stages.
- Multi-entity processes can contain no more than five entities.
On the Donor Cycle entity (Custom Entity), we have two forms named “Managed Donor Cycle” and “Annual Fund Donor Cycle”. If we change one form to another form, automatically Business Process Flow will also change. Following is the process explained to achieve this requirement.
Step 1: Create two forms on an entity as shown in the following screenshots:
- Managed Donor Cycle
- Annual Fund Donor Cycle
Step 2: Create two Business Process Flows on an entity.
Step 3: Create a Web Resource where the type is “Jscript”.
var formType = Xrm.Page.ui.getFormType();
// Getting Form Type
formContext = executionContext.getFormContext();
// Getting Form Context
var formName = Xrm.Page.ui.formSelector.getCurrentItem().getLabel();
// Getting Form Name
var activeProcess = Xrm.Page.data.process.getActiveProcess();
// Getting Name
if (activeProcess.getId() != null)
var activeProcessID = activeProcess.getId();
if (formType != 1 && formName == “Managed Donor Cycle” &&
activeProcessID.toUpperCase() != “DEEC5EF0-9F6D-4D6D-8878-65E7473A9921”)
// “DEEC5EF0-9F6D-4D6D-8878-65E7473A9921” – GUID of the Managed Donor
// Cycle Business Process Flow
else if (formName == “Annual Fund Donor Cycle” && activeProcessID.toUpperCase() !=
// “7CBE0333-7D3F-49F1-AAAF-0B2C746C67FB” – GUID of Annual Fund Managed Donor Cycle
//Business Process Flow
Step 4: Trigger the above function on the “Onload” of both forms.