Hello all, I've written a saved search to grab a l...
# general
t
Hello all, I've written a saved search to grab a large amount of data from netsuite. Because of execution time I have to run the search intermittently by grabbing data in a specific range. I'm starting off with 0-1000, 1000-2000, 2000-3000... etc. For some reason it will fail to grab records in a specific range even though I'm aware they exist. When the increment is 1000, it fails to grab records between 9000-10000 but has no problems from 10000+. However, if the increment is 50, it will grab 0-50, but fail to grab 50-100. Does anyone know what is going on here and what I can do to successfully grab the data in the range I supply?
b
how are you creating the increment
t
I run my search with {start, end} supplied from the server
Copy code
var resultsSlice = results.getRange({
    start: context.searchId,
    end: context.searchEnd
});
Output:
array(2) { [0]=> array(2) { [0]=> array(4) { ["action"]=> string(14) "runSavedSearch" ["savedSearchID"]=> string(16) "customsearch1546" ["searchId"]=> int(0) ["searchEnd"]=> int(50) } ["count"]=> int(50) } [1]=> array(2) { [0]=> array(4) { ["action"]=> string(14) "runSavedSearch" ["savedSearchID"]=> string(16) "customsearch1546" ["searchId"]=> int(50) ["searchEnd"]=> int(100) } ["count"]=> int(0) } }
b
are you sure your restlet is receiving a request with context.searchIdequal to 50, context.searchEnd to 100?
t
Yes I am positive actually
Do you know what is required to increase execution time for a suitescript?
There's other methods of retrieving this data but all hit a runtime exception because it doesn't have enough time to gather 28000 records from a search
b
none really, your choice is to basically pick something runnable from the task module
unless you have some weird script, id say double check your server
if you suspect the restlet, add more logging so you know what it outputs for each input