top of page

Dynamics 365 – Business Process Flow




This is a nice to have to guide users in terms of filling information based on stages, for instance:

The information needed to a contact to be a prospect, probably we only need First Name, Last Name and mobile phone. On the other hand, to become an opportunity, we will need some more details.


In this situation i would use this kind of approach, Business Process, because it will be really easy to see by opening the record in which phase of the process the contact is only by looking to the process bar.


However, using this feature of CRM can be sometimes a little bit disappointing because customizing what the fields do (hiding based on rules, setting required based on others is not possible), i mean, configuring only with the CRM default functionality is not possible.


My personal opinion and because i’ve been working with CRM on my last 13 years already, using Javascript for this purposes it can be a nightmare in terms of Upgrades of the product.


But, because sometimes you get to a point where a system is already implemented and you don’t have the time to redesign the feature, one thing i have to say, just customize with an approach of having some constants with the name of the field, and not use hard-coded all-around.

With this, if the DOM changes, you will need to change the new name only in one place, instead of in all the places you have been using this.


For this example i will give few lines of Javascript that can be used to Hide the next stage button on the Process flow, set the required level of a field and set the field readonly.


var probabilityHeaderFieldName = "header_process_new_probability_1";

//to set required

Xrm.Page.getControl(probabilityHeaderFieldName ).getAttribute().setRequiredLevel("required");

//to set readonly

Xrm.Page.getControl(probabilityHeaderFieldName ).setDisabled(true);

//to hide the next stage button

var nextStageButtonName = "stageAdvanceActionContainer";

document.getElementById(nextStageButtonName ).style.visibility = ‘hidden’;


Microsoft URL for the Business Process Flow, click here.


Hope it helps.

0 views0 comments

Recent Posts

See All

CRM Dynamics 365 V9.0 – Web API improvements

The following improvements are included in this release of the Web API, our OData v4 endpoint: Custom actions that return EntityReference, Entity, or EntityCollection types are available. Changes to A

bottom of page