I have a page that has a custom function that saves then updates a model. However, the updateData() method doesn’t seem to be working. Everything seems to save fine, but the field editor on the page never changes, though when I refresh the page I can see that the changes occurred. I’m not getting errors in the console, either. Here’s the javascript that is running:
var params = arguments[0],
chosenRow = params.item.row,
classesModel = params.model,
$ = skuid.$,
teacherModel = skuid.model.getModel(‘Teacher’);
classModel = skuid.model.getModel(‘Class’);
var teacherRow = teacherModel.getFirstRow();
classesModel.updateRow(chosenRow,‘Teacher__c’,teacherModel.getFieldValue(teacherRow,‘Id’));
classesModel.save({callback: function(result){
if (result.totalsuccess) {
classModel.updateData(); // THIS IS WHAT DOESN’T SEEM TO BE WORKING
} else {
console.log(result.insertResults[0]);
}
}});
Question
Why isn't my updateData() statement refreshing the data on the page?
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.