Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

ResultSet.getRange(options)

{ResultSet}.getRange({start: {number},end: {number}})

N/search Module
ResultSet.getRange()
Method Description: Retrieve a slice of the search result as an array of search.Result objects. The start parameter is the inclusive index of the first result to return. The end parameter is the exclusive index of the last result to return. For example, getRange(0, 10) retrieves 10 search results, at index 0 through index 9. Unlimited rows in the result are supported, however you can only return 1,000 at a time based on the index values. If there are fewer results available than requested, then the array will contain fewer than end - start entries. For example, if there are only 25 search results, then getRange(20, 30) will return an array of 5 search.Result objects. If you specify a range for which there are no results, an empty array is returned. For example, if there are 25 search results, then getRange(30, 40) will return an empty array.
Returns: search.Result[]
Supported Script Types: All script types For more information, see SuiteScript 2.0 Script Types.
Governance: 10 units
Module: N/search Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=ResultSet.getRange(options)

Example:

// Code Example 1
//Add additional code
//...
var results = rs.getRange({
start: 0,
end: 1000
});
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_456010986327.html