Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

Search.save.promise()

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

N/search Module
Search.save.promise()
Method Description: Asynchronously saves a search created by search.create(options) or loaded with search.load(options). Returns the internal ID of the saved search. The parameters and errors thrown for this method are the same as those for Search.save(). For more information on promises, see Promise Object.
Returns: Promise Object
Synchronous Version: Search.save()
Supported Script Types: All client-side scripts For more information, see SuiteScript 2.0 Client Script Type.
Governance: 5 units
Module: N/search Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Search.save.promise()

Example:

// Code Example 1
//Add additional code
//...
search.create.promise({
type: search.Type.SALES_ORDER
})
.then(function(searchObj) {
return searchObj.save.promise()
})
.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_4440796572.html