How can you use an `or` expression when using `sea...
# suitescript
n
How can you use an
or
expression when using
search.createFilter
? I have tried a couple of things but doesn't seem to work
Copy code
search.createFilter([
                {
                    name: 'custbody_cr_location',
                    operator: search.Operator.ANYOF,
                    values: location
                },
                'OR',
                {
                    name: 'location',
                    operator: search.Operator.ANYOF,
                    values: location
                }
            ])
and I have also just tried to add an array directly to the
searchResults.filters
like so
Copy code
searchResults.filters.unshift([
            ['custbody_cr_location', 'anyof', location],
            'OR',
            ['location', 'anyof', location]
        ])