.refresh()

Previous Next

Refreshes the record.

Returns a Promise object or the 'this' object.

Syntax

.refresh( options )

 

options  ::=  {

     promise:  promise

,    success:  success-function

,    error:  error-function

}

 

promise  ::= { true | false }

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

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

Success-function is a function that is executed after the records are successfully refreshed.

Error-function is a function that is executed if an error occurred.

 

Example 1

$.udb('EMP').rows('current').refresh();

 

Example 2

To refresh all rows where MANAGER is NULL and SALARY is higher than 35000:

$.udb('EMP').rows('condition', { MANAGER: "NULL", SALARY: ">35000" } ).refresh();