I need to add a set of filter conditions with brackets through the createfilter method, but in suitescript 2.0 I did not find an effective method
Asked
Active
Viewed 101 times
1
-
Please provide enough code so others can better understand or reproduce the problem. – Community Sep 23 '21 at 05:53
1 Answers
0
Use a filter expression.
Create the search in the UI, and then load the search using search.load()
. You can inspect the filter expression that way.
const mySearch = search.load({id:'customsearch_mysearch'});
log.debug('expression', mySearch.filterExpression);
The filter expression is an array. You can set the filters when you create the search.
Something like;
search.create({
type: 'customer',
filters: myFilterArray,
columns: [
search.createColumn({name: 'entityid'})
]

ehcanadian
- 1,738
- 1
- 15
- 23