Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

Search.filterExpression

{Search}.filterExpression{SSS_INVALID_SRCH_FILTER_EXPR: {Malformed search filter expression.}})

N/search Module
Search.filterExpression
Property Description: Use filter expressions as a shortcut to create filters (search.Filter). A search filter expression is a JavaScript string array of zero or more elements. Each element is one of the following: Operator - For a list of supported operators, see search.Operator. Filter term Two or more filter expressions combined logically with ‘and’, ‘or’, or ‘not’ This property accepts nested arrays in which any element of the nested array can be an Object, a string, a number, or a boolean. Use null to set an empty array and remove any existing filter expressions on this search. If you want to get or set search filters, use the Search.filters property.
Type: Array[]
Supported Script Types: All script types For more information, see SuiteScript 2.0 Script Types.
Module: N/search Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Search.filterExpression

Example:

// Code Example 1
//Add additional code
//...
search.create({
type: search.Type.CUSTOMER,
filters: [
['email', search.Operator.STARTSWITH, 'kwolff'],
'and',
[
['id', search.Operator.EQUALTO, 107], 'or',
['id', search.Operator.EQUALTO, 2508]
]
]
});
//...
//Add additional code

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