Appframe Knowledge Base


1 hits
0

How to update and save current data object row in JavaScript

// First update the values you want to save
dsSomething.currentRow("SomeField", "NewValue");
dsSomething.currentRow("OtherField", "OtherValue");

// The use one of the following depending on the situation
dsSomething.endEdit(); // Fire and forget
dsSomething.endEdit(function() { /* do something after */ }); // Asynchronously
dsSomething.endEdit(function() { /* do something after */ }, true); // Synchronously

components dataobject web · Perma link post comment Posted by: Torbjørn Mevik (15-jul-2013)

D. Young Hoang :
dsSomething.endEdit(function(eErr, eData) { if (eErr === null) { alert('Successfully saved.'); } else { alert('Something went wrong. Please try again(' + eErr + ')'); } }, true); (06-jul-2018)