Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

search.create.promise(options)

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=search.create.promise(options) for more information.

N/search Module
search.create.promise()
Method Description: Creates a new search asynchronously and returns it as a search.Search object. The parameters and errors thrown for this method are the same as those for search.create(options). For more information on promises, see Promise Object.
Returns: Promise Object
Synchronous Version: search.create(options)
Supported Script Types: All client-side scripts For more information, see SuiteScript 2.0 Client Script Type.
Governance: None
Module: N/search Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=search.create.promise(options)

Example:

// Code Example 1
//Add additional code
//...
search.create.promise({
type: search.Type.SALES_ORDER
})
.then(function(result) {
log.debug({
details: "Completed: " + result
});
// do something after completion
})
.catch(function(reason) {
log.debug({
details: "Failed: " + reason
})
// do something on failure
});
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4440790350.html