Requirement: Business Process require to hide Business Process Flow on Opportunity Form if Opportunity Type is Consumer. In below Xrm code I have apply this business process requirement.
Opportunity is not Consumer:
Opportunity is Consumer:
Xrm Code
-- Code on Form Load
Hiding BPF if Opportunity Type is Consumer Opportunity i.e equal to 4
if (IsHideBPF() == true)
document.getElementById('header_process_d').style.display = "none";
function IsHideBPF() {
var oppType = Xrm.Page.getAttribute("new_recordtype");
if (oppType != null) {
oppType = oppType.getValue();
if (oppType == 4) { // Conumser.Opportunity
return true;
}
}
return false;
}
Ali Wadood
Dynamics CRM Consultant - Maison Consulting & Solutions