Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
How to Update Saved Search via Script
Hi,
I am trying to update the filters of a set of saved searches using a generic saved search.
Here is my loop:
for (var i = 0; i<selectedMarkets.length; i++){
var selectedSearchId = marketplaces[selectedMarkets[i]].searchId;
log.debug('Saved Search',selectedSearchId);
var searchObj = search.load({id:selectedSearchId});
searchObj.filters = filter;
log.debug('Generic Filters in Loop',filter);
log.debug('Updated Filters',searchObj.filters);
searchObj.save();
}
When I look at my log, it tells me that "Updated Filters" has exactly the same array as "Generic Filters in Loop", as if the script has indeed updated the filters based on the generic saved search filters. However, the Saved Search do not actually update.