Reputation: 115
I have created a saved search in suitelet. Now I want to set the search criteria so that only records having status = "Wiped or Destroyed" should return. Note that the field is of list/record type. Currently I've tried this, which is not working.
savedSearch.filters.push(search.createFilter({
name: 'custrecord110',
operator: search.Operator.ANYOF,
values: ['Wiped','Destroyed']
}));
Upvotes: 0
Views: 109
Reputation: 15377
If your field is a list/record field then you need to use the internal ids of the corresponding list/record values.
e.g. 'anyof', [1,3]
The simplest way to get these is to set your view preferences to show internal ids and then look at the list.
If the field is a text field then you can use a formula or filter expression
Upvotes: 1