function onLoad()
{
disableFormFields(true);
}
function disableFormFields(onOff)
{
Xrm.Page.ui.controls.forEach(function (control, index)
{
if (doesControlHaveAttribute(control))
{
control.setDisabled(onOff);
}
});
}
function doesControlHaveAttribute(control)
{
var controlType = control.getControlType();
return controlType != "iframe" && controlType != "webresource" && controlType != "subgrid";
}
Hiç yorum yok:
Yorum Gönder