Discussions
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. Join us
nlapiLoadSearch with Saved Search + Filter
For the most part, when I use nlapiLoadSearch for a saved search everything works fine. However, in some cases where the saved search has a filter (in the saved search itself, not in code) the result set always returns zero.
var search = nlapiLoadSearch('customer', 1234); // 1234 is the saves search internal id
var resultset = search.runSearch();
var resultSlice = resultset.getResults(0, 1000);
In this case, if my saved Customer search (1234) has a filter on a basic column like inActive, everything works. But, if I put a filter on the transaction item, the saved search returns results in the netsuite ui but in suitescript it returns no results (and no error occurs). It seems to be isolated to only certain filter fields. This has been a bug since nlapiLoadSearch first became available in 2012.1.