function setFormAsReadOnly() {
// define the logic here
disableFormFields(true);
}
function doesControlHaveAttribute(control) {
var controlType = control.getControlType();
return controlType != "iframe" && controlType != "webresource" && controlType != "subgrid";
}
function disableFormFields(onOff) {
Xrm.Page.ui.controls.forEach(function(control, index) {
if (doesControlHaveAttribute(control)) {
control.setDisabled(onOff);
}
});
}
2 comments:
thanks for this tip ,its working perfect,similar informations can be found at Microsoft Dynamics CRM
nice site for CRM . Microsoft Dynamics CRM
Post a Comment