Search code examples
netsuitesuitescript

Bug: values in NetSuite


Here's the code:

if (params.Reprint == "true")
  openSearch.filters.push(search.createFilter({
    name: "new_printed",
    operator: "is",
    values: [false]
   }));

But after running this, values is empty: "values": [].

Please help me solve this problem.


Solution

  • The syntax here is wrong.

    Try it in this way:

    openSearch.filters.push(search.createFilter({ name: "new_printed", operator: search.Operator.IS, values: "F" }));
    

    Let me know.