在CRM 2015中禁用表单上的所有字段
问题描述:
嗨我希望在使用插件或Jscript保存时禁用CRM 2015中的所有字段
hi I want Disable all fields on a frorm in CRM 2015 on save using plugin or Jscript
答
Xrm.Page.data.entity.attributes.forEach(function (attribute, index) {
var control = Xrm.Page.getControl(attribute.getName());
if (control) {
control.setDisabled(true)
}
});