Created
January 23, 2014 06:00
-
-
Save rhaseven7h/8573669 to your computer and use it in GitHub Desktop.
This is a generic way of fetching more than 1000 rows from a search in NetSuite.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.clear(); | |
var res; | |
var rows = new Array(); | |
res = nlapiSearchRecord("customrecord_tel_tarifas_globales", null, null, null); | |
if(res) { | |
rows = rows.concat(res); | |
while(res.length == 1000) { | |
var lastId=res[999].getId(); | |
res = nlapiSearchRecord( | |
"customrecord_tel_tarifas_globales", | |
null, | |
[ | |
new nlobjSearchFilter("internalIdNumber", null, "greaterThan", lastId), | |
], | |
null | |
); | |
if(res) { | |
rows = rows.concat(res); | |
} | |
} | |
} | |
console.dir(rows); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment