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
Need help with group filter
I have the following filter that isn't returning the right result:
filters[0] = new nlobjSearchFilter('internalid', 'contact', 'is', input.id);
filters[1] = new nlobjSearchFilter('firstname', null, 'contains', input.searchValue).setOr(true);
filters[2] = new nlobjSearchFilter('lastname', null, 'contains', input.searchValue).setOr(true);
filters[3] = new nlobjSearchFilter('companyname', null, 'contains', input.searchValue).setOr(true);
filters[4] = new nlobjSearchFilter('email', null, 'contains', input.searchValue).setOr(true);
filters[5] = new nlobjSearchFilter('entitystatus', null, 'anyof', leadStatusCodes);
This is not working how I would want it where I really want:
filters[0] and (filters[1] or filters[2] or filters[3] or filters[4]) and filter[5]
Is there a better way to do this that works.