['trandate', 'notbefore', 'daysAgo17']
Here are the search operators:
https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3005172.html
Of course you can use serach.Operator enum:
https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4345782273.html
Here are the search summary types:
https://system.netsuite.com/app/help/helpcenter.nl?fid=section_N3010474.html
You can use ANYOF operator only on select type fields (List/Record). If you want to use it against free-text fields (like names, emails etc.), the only way is to create a nested Filter Expression with 'OR' operators:
[ ['email', 'startswith', '[email protected]'],
'or', ['email', 'startswith', '[email protected]'],
'or', ['email', 'startswith', '[email protected]'],
'or', ['email', 'startswith', '[email protected]']
]
or you can write small script, doing this instead of you:
function stringFieldAnyOf(fieldId, listOfValues) {
var result = [];
if (listOfValues.length > 0) {
for (var i = 0; i < listOfValues.length; i++) {
result.push([fieldId, 'startswith', listOfValues[i]]);
result.push('or');
}
result.pop(); // remove the last 'or'
}
return result;
}
// usage: (two more filters added just to illustrate how to combine with other filters)
var custSearch = search.create({
type: record.Type.CUSTOMER,
columns: searchColumn,
filters: [
['companyname', 'startswith', 'A'],
'and', stringFieldAnyOf('email', ['[email protected]', '[email protected]']),
'and', ['companyname', 'contains', 'b']
]
});
var s = search.load('customsearch1234');
log.debug('filterExpression', JSON.stringify(s.filterExpression));