netsuite Executing a Search SS 2.0 From Saved Search

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

require(['N/search'], function(SEARCHMODULE){
    var savedSearchId = 'customsearch_mySavedSearch';
    var mySearch = SEARCHMODULE.load(savedSearchId);
    var resultset = mySearch.run();
    var results = resultset.getRange(0, 1000);
    for(var i in results){
        var result = results[i];
        for(var k in result.columns){
            log.debug('Result is ' + result.getValue(result.columns[k])); //Access result from here
        }
    }
});


Got any netsuite Question?