Search.settings

Note:

The content in this help topic pertains to SuiteScript 2.0.

Property Description

Search settings for this search as an array of search.Setting objects or a string array of column names. Search settings let you specify search parameters that are typically available only in the UI.

You set this value with an array of search.Setting objects or a single search.Setting object. You can create a search.Setting object by calling search.createSetting(options). You can also set this value with an array of column names, each of which is a string.

The supported values for a search.Setting object differ depending on the search parameter that you set. For more information, see Setting.name and Setting.value.

Type

search.Setting[] | string[]

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/search Module

Since

2018.2

Errors

Error Code

Thrown If

SSS_INVALID_SRCH_SETTING

An unknown search parameter name is provided.

SSS_INVALID_SRCH_SETTING_VALUE

An unsupported value is set for the provided search parameter name.

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/search Module Script Samples.

          //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 

        

Related Topics

search.Search
N/search Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices