You can manage pending operations using these methods:
- cancelPending – cancels the previous create, update, or delete operations on the MBO. It cannot cancel submitted operations.
- submitPending – submits the operation so that it can be replayed on the Unwired Server. A request is sent to the Unwired Server during a synchronization.
- submitPendingOperations – submits all the pending records for the entity to the Unwired Server. This method internally invokes the submitPending method on each of the pending records.
- cancelPendingOperations – cancels all the pending records for the entity. This method internally invokes the cancelPending method on each of the pending records.
Customer customer = Customer.findById(101);
if (errorHappened) {
customer.cancelPending();
}
else {
customer.submitPending();
}