Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

Search.save()

{Search}.save(){SSS_MISSING_REQD_ARGUMENT: {{1}: Missing a required argument: {2}},NAME_ALREADY_IN_USE: {A search has already been saved with that name. Please use a different name.},SSS_DUPLICATE_SEARCH_SCRIPT_ID: {Saved search script IDs must be unique. Please choose another script ID. If you are trying to modify an existing saved search, use search.load().}})

N/search Module
Search.save()
Method Description: Saves a search created by search.create(options) or loaded with search.load(options). Returns the internal ID of the saved search. You must set the title and id properties for a new saved search before you save it, either when you create it with search.create(options) or by setting the Search.title and Search.id properties. If you do not set the saved search ID, NetSuite generates one for you. See Search.id. You do not need to set these properties if you load a previously saved search with search.load(options) and then save it. This method also includes a promise version, Search.save.promise(). For more information about promises, see Promise Object.
Returns: the internal search ID of the saved search as a number
Supported Script Types: All script types For more information, see SuiteScript 2.0 Script Types.
Governance: 5 units
Module: N/search Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Search.save()

Example:

// Code Example 1
//Add additional code
//...
mySalesOrderSearch.save();
//...
//Add additional code

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