How to disable change / validation events when using loadRecord
Published on 2/14/2012
When you use Basic.loadRecord() to load a record into a form, all of the form fields fire their change events, which you might not want. Here’s a quick way to fix this:
This prevents change events from firing, but then re-enables them:
var basic = form.getForm();
basic.getFields().each(function(item, index, length){
item.suspendCheckChange++;
});
basic.loadRecord(myRecord);
basic.getFields().each(function(item, index, length){
item.suspendCheckChange--;
});
... views