Search.filters

Note:

The content in this help topic pertains to SuiteScript 2.0.

Property Description

Filters for the search as an array of search.Filter objects. Value is null if the search has no defined filters.

You set this value with an array or single search. Filter objects to overwrite any prior filters. Use null to set an empty array and remove any existing filters on this search. Use search.createFilter(options) to create a filter.

Filter expressions are an alternative way to define filters of a search. The expressions are an array of JavaScript objects that are passed through this property. For more information about filter expressions, see the Search.filterExpression property.

Type

search.Filter[]

Supported Script Types

Client and server scripts

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

Module

N/search Module

Since

2015.2

Errors

Error Code

Message

Thrown If

SSS_INVALID_SRCH_FILTER

An search filter contains invalid search criteria

Invalid value for search filter type.

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 myFilter = search.createFilter({
    name: 'entity',
    operator: search.Operator.ISEMPTY,
});

function createSearch() {
    var mySalesOrderSearch = search.create({
        type: search.Type.SALES_ORDER,
        filters: myFilter
        });
...
//Add additional code 

        

Related Topics

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

General Notices