Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Saved search won't filter with nlobjSearchFilter
I have a saved search for product issues which returns issues for multiple products.
Rather than create MANY different saved searches (one for each product), I'm trying to make this one search filterable via script, so that the script can narrow the search results down further, to issues for one product.
It's supposedly possible to pass additional search filters into a search, thusly:
var searchresults = nlapiSearchRecord('issue',searchID,[new nlobjSearchFilter("product",null,"is","Product Name Here")], null);
When I start looping through searchresults, I get unfiltered results back, as if the nlobjSearchFilter() parameter is ignored. I've tried various permutations of "anyof", "is" and "contains" but still no filtering.