Modules
Objects/Functions
SuiteScript 2.0
// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=search.lookupFields.promise(options) for more information.
N/search Module
search.lookupFields.promise()
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.
The parameters and errors thrown for this method are the same as those for search.lookupFields(options). For more information on promises, see Promise Object.
Returns:
Promise Object
Synchronous Version:
search.lookupFields(options)
Supported Script Types:
All client-side scripts
For more information, see SuiteScript 2.0 Client Script Type.
Governance:
1 unit
Module:
N/search Module
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=search.lookupFields.promise(options)
Example:
// Code Example 1
//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
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4440795405.html