Update Operation

The update operation updates a record in the local database on the device. To execute update operations on an MBO, get an instance of the MBO, set the MBO attributes, then call either the save() or update() operation. To propagate the changes to the server, call submitPending.

Note: Calling update on an orphaned instance (a row that no longer exists) causes a PersistenceException.
Customer cust = Customer.findById(101);
cust.setFname("supAdmin");
cust.setCompany_name("SAP");
cust.setPhone("777-8888");
cust.save(); // or cust.update();
cust.submitPending();
SMP101DB.synchronize(); 
// or SMP101DB.synchronize (String synchronizationGroup)

To update multiple MBOs in a relationship, call submitPending() on the parent MBO, or call submitPending() on the changed child MBO: