0
votes

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']
                }));
1

1 Answers

1
votes

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