Benjamin Jung
10/09/2023, 5:01 PMnlapiSearchRecord
returns a length
property. What's a straightforward way of achieving the same thing in SS 2.x? For instance, to check whether there are any search results at all.
If I want to use .each
on the resultSet, is the only thing I can do just count the iterations (i.e. no way to get the result set count before that)?creece
10/09/2023, 5:03 PMcreece
10/09/2023, 5:04 PMconst ADDITIONAL_SHIPPING_DAYS_SEARCH_RESULTS = ADDITIONAL_SHIPPING_DAYS_SEARCH.runPaged({
pageSize: 1000
});
log.debug({title: 'ADDITIONAL_SHIPPING_DAYS_SEARCH_RESULS.count', details: ADDITIONAL_SHIPPING_DAYS_SEARCH_RESULTS.count});
Anthony OConnor
10/09/2023, 5:07 PMBenjamin Jung
10/09/2023, 5:08 PMsearch.run()
and then relying on .each
, there is no count property. So I suppose I must use one of the other methods (runPaged or getRange)?creece
10/09/2023, 5:10 PMBenjamin Jung
10/09/2023, 5:13 PMAnthony OConnor
10/09/2023, 5:21 PMBenjamin Jung
10/09/2023, 5:24 PMcolumns,getRange,each,toString,toJSON
.Anthony OConnor
10/09/2023, 5:34 PMAnthony OConnor
10/09/2023, 5:42 PMconst searchResultCount = searchObj.runPaged().count;
log.debug("searchObj result count",searchResultCount);
searchObj.run().each(function(result){
// .run().each has a limit of 4,000 results
return true;
});
NElliott
10/10/2023, 7:09 AMbattk
10/10/2023, 7:36 AM