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. For message-based synchronization, a replay request is sent directly to the Unwired Server. For replication-based synchronization, 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.FindByPrimaryKey(101);
if(errorHappened)
{
Customer.CancelPending();
}
else
{
customer.SubmitPending();
}