search.delete.promise(options)
Method Description |
Deletes an existing saved search asynchronously and returns it as a search.Search object. The saved search can be created using the UI or created with search.create(options) and Search.save().
Note:
The parameters and errors thrown for this method are the same as those for search.delete(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 |
5 units |
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.delete.promise({id: 'customsearch_txn_search_salesorder'})
.then(function(){
search.load({
id: 'customsearch_txn_search_salesorder'
});
})
.catch(function onRejected(reason) {
log.debug({
details: 'Invalid search: ' reason.name
});
});
...
//Add additional code