search.Setting

Note:

The content in this help topic pertains to SuiteScript 2.0.

Object Description

Defines a search setting.

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 Show Period End transactions feature to be enabled.

Use search.createSetting(options) to create a setting. After you create your settings, assign them as array values to Search.settings.

For a complete list of this object’s properties, see Setting Object Members.

Supported Script Types

Client and server scripts

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

Module

N/search Module

Since

2018.2

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

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

General Notices