Previous Next

Rolls back manipulated data.

Returns a Promise object or the 'this' object.


.rollback( options )


options          ::=  {


,   quiet: quiet

,   promise:  promise

,   success: success-function

,   error: error-function



keep-selections  ::=  { true | false }

quiet            ::=  { true | false }

promise          ::=  true | false }

Options is a struct that can have the following items, all of which are optional.

Keep-selections is a boolean that specifies whether the current record remains the same after rollback:



true (the default)

The current record is guaranteed to be the same record as before the rollback, in the sense of "the same data": the record with the same primary key values.


The current record after rollback is guaranteed to be the record that has the same position in the row set as the current record had before the rollback.

Quiet is a boolean that determines whether or not a message is displayed when the rollback is completed. The default is false, meaning that a message is displayed by default.

Promise determines the return value of this function. If promise has the value 'true' (the default), a Promise object is returned. If promise has the value 'false', the ‘this’ object is returned instead.

Success-function is a function called when the rollback is completed.

Error-function is a function called if the rollback fails.



 success: function(event,state){