Skip to main content

Notifications

Day 6: Showing and Hiding Fields with JavaScript in MSCRM

In this blog we will see how to Showing and Hiding Fields with JavaScript in MSCRM

function enableDisableFieldsBasedonCondition(executionContext) {
    debugger;
    var formContext = executionContext.getFormContext();

    if (formContext.getAttribute("bosch_booleanfield").getValue() == true) {
        formContext.getControl("bosch_enabledisablefield").setDisabled(true);
    }
    else if (formContext.getAttribute("bosch_booleanfield").getValue() == false) {
        formContext.getControl("bosch_enabledisablefield").setDisabled(false);
    }
}

Comments