function disableForm() {
var submitStatus = Xrm.Page.getAttribute("new_status").getValue();
if (submitStatus != 1) {
var controls = Xrm.Page.ui.controls.get();
for (var i in controls) {
var control = controls[i];
if (control.getControlType() != "iframe" && control.getControlType() != "webresource"
&& control.getControlType() != "subgrid" && control.getDisabled() == false) {
control.setDisabled(true);
}
if (control.getControlType() == "subgrid") {
debugger;
var addIamgeButton = $('#titleContainer_' + control.getName());
if (addIamgeButton != null && addIamgeButton != undefined) {
$('#titleContainer_' + control.getName(), window.parent.document).css('display', 'none');
}
}
}
}
}