Hello, what am I doing wrong with my search filter...
# suitescript
p
Hello, what am I doing wrong with my search filters below? I keep on getting an error when I try to save my script. filters: [{ name: 'name', operator: search.Operator.IS, values: [ratiodate] },"AND",{name: 'trandate', operator: search.Operator.WITHIN, values: [custrecord_pi_startdate,custrecord_pi_enddate]} });
b
"AND"
is not a filter
p
how do I add a condition to support both filters?
b
you shall receive the generic search advice to build the search in the ui, load it in script, then copy it
p
thanks
Hello, I have one more question. Is it possible to do a within statement for a search filter in a script with two custom fields? filters[1] = search.createFilter({ name:'trandate',operator: search.Operator.WITHIN,values: [custrecord_pi_startdate,custrecord_pi_enddate] });
I can not figure out how to set that up in a saved search
b
same answer as last time you asked, use 2 filters
p
thanks
I understand