Script:
disableFormFields = function (onOff) {
Xrm.Page.ui.controls.forEach(function (control, index) {
if (doesControlHaveAttribute(control)) {
control.setDisabled(onOff);
}
});
} //Function to disable all the field in the form// true/false
doesControlHaveAttribute = function (control) {
var controlType = control.getControlType();
return controlType != "iframe" && controlType != "webresource" && controlType != "subgrid";
} //Sub disableFormFields// Check the form have control like iframe, webresource or subgrid
function onload() {
disableFormFields(true);
}
CRM 2013 Javascript Disable form.
Posted by Unknown at 1/13/2015 02:53:00 pm
Labels: CRM 2013, Javascript
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment