function formdisable() {
var skipFields = ",new_fieldtoskip1name,new_fieldtoskip2name,";
var allAttributes = Xrm.Page.data.entity.attributes.get();
for (var i in allAttributes) {
var myattribute = Xrm.Page.data.entity.attributes.get(allAttributes[i].getName());
var myname = myattribute.getName();
if (skipFields.indexOf("," + myname + ",") != -1) {
continue;
}
try {
Xrm.Page.getControl(myname).setDisabled(true);
} catch (err) {}
}
}