.acceptLookupValue()

Previous Next

Accepts the selected lookup value on a lookup page or dialog. After successful execution, the page is closed and the user is returned to the page that was current before the lookup page was opened.

Returns a Promise object or the 'this' object.

Syntax

.acceptLookupValue( options )

 

options  ::=  {

     keepOpen:  keep-open  

,    promise:  promise

,    success:  success-function

,    error:  error-function

}

 

keep-open  ::=  { true | false }

promise    ::=  true | false }

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

Keep-open has an effect only when applied to a lookup dialog. It specifies whether or not the lookup dialog stays open after accepting the lookup value. The default is false.

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 after the lookup value has successfully been accepted.

Error-function is a function called if an error occurs.

NOTE: This function is called by default on the Select button of default lookup pages.

 

Example

$.udb.acceptLookupValue();