search.lookupFields.promise(options)
Method Description |
Performs a search asynchronously for one or more body fields on a record. Returns select fields as an object with value and text properties. Returns multiselect fields as an object with value:text pairs.
Note:
The parameters and errors thrown for this method are the same as those for search.lookupFields(options). For more information about promises, see Promise Object. |
Returns |
|
Synchronous Version |
|
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
1 unit |
Module |
|
Since |
2015.2 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete promise script example, see Promise Object.
//Add additional code
...
search.lookupFields.promise({
type: search.Type.EMPLOYEE,
id: -5,
columns : 'email'
})
.then(function (result) {
log.debug({
details: "Completed: " + result
});
// do something after completion
})
.catch(function onRejected(reason) {
// do something on rejection
});
...
//Add additional code