Friday, August 7, 2015

Hide Business Process Flow Based on Condition


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

Asp.Net MVC (5) - Exception Filter - HandleError

Applicable on Asp.Net MVC5 HandleError Filter This belongs to Exception Filters category (Authentication Filter, Authoriz...