Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

search.createSetting(options)

{search}.createSetting({name: {string},value: {string}})

N/search Module
search.createSetting()
Method Description: Creates a new search setting and returns it as a search.Setting object. Search settings let you specify search parameters that are typically available only in the UI. The following settings are supported: Consolidated Exchange Rate: This setting affects how consolidation is performed (for example, consolidation using the Average rate type, consolidation using the Historical rate type, and so on). This setting applies to transaction searches, and it is applicable only to OneWorld accounts. Show Period End Transactions: This setting indicates whether period end transactions are included in search results. This setting applies to transaction searches, and it is applicable only to OneWorld accounts. It also requires the Period End Journal Entries feature to be enabled. After you create your settings, assign them as array values to Search.settings.
Returns: search.Setting
Supported Script Types: All script types For more information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/search Module
Since: 2018.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=search.createSetting(options)

Example:

// Code Example 1
//Add additional code
//...
var mySearch = search.create({
type: 'transaction',
columns: [ 'trandate', 'amount', 'entity' ],
filters: [
search.createFilter({
name: 'internalid',
operator: search.Operator.ANYOF,
values: [13, 12356]
})],
settings: [
search.createSetting({
name: 'consolidationtype',
value: 'NONE'
})]
});
//...
//Add additional code

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