```var yearFilter = search.createFilter({name: 'po...
# suitescript
r
Copy code
var yearFilter = search.createFilter({name: 'postingperiod', operator: search.Operator.CONTAINS, values: [YTDRange.year]});
I'm trying to use this filter for a search on Transactions. The year is "2020". Is there a better way to do this? I also tried
name: 'periodname', join: search.Type.ACCCOUNTING_PERIOD
. Neither is working.
b
posting period is a little weird, but its certainly not a string type operator. contains is only for strings.
r
Copy code
["postingperiod","rel","TFYTP"]
Are there enums for the operator/value?
I did a saved search export.
b
its why its weird
r
gotcha
b
you can use a text formula to make it behave like a string