var controls = Xrm.Page.ui.controls.get();
for (var i in controls){
var control = controls[i];
if (!control.getDisabled()){
control.setDisabled(true);
}}
for (var i in controls){
var control = controls[i];
if (!control.getDisabled()){
control.setDisabled(true);
}}