This article is about the refresh() function of the Rows object.
Rows.refresh()
Refreshes the record.
Returns a Promise object or the 'this' object. From USoft 10.0.1I, returns a udbPromise instead of a Promise object.
Syntax
rows.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();
Related events
Event | Applies to | Occurs when |
---|---|---|
rowprerefresh | Data source objects | Before a record is refreshed |
rowpostrefresh | Data source objects | After a record is refreshed |