Thursday, 21 June 2018

Enabling/Disabling Fields using JavaScript in Dynamic CRM

disable control in dynamic crm using javascript
Description:
In this example we explain that ow to disabling control in Dynamic CRM using JavaScript. Or how to disable controls in a section of Dynamic CRM form using JavaScript. Or how to set read only field in Dynamic CRM programmatically using JavaScript. Or how to disabling control dynamically using JavaScript in Dynamic CRM.

So here we demonstrate that how to disable control in Dynamic CRM using JavaScript. Or disable/enable fields in Dynamic CRM using JavaScript. Below is the JavaScript code that will help you to disable and enable control in Dynamic CRM dynamically.
Code:

function SetEnableDisableControl() {
            if (Xrm.Page.getAttribute("new_type").getValue() == 1) {
                Xrm.Page.getControl("new_SourceType").setDisabled(false);
            } else {
                Xrm.Page.getControl("new_SourceType").setDisabled(true);
            }
        }



1 comments: