Modules

filter

 

Objects/Functions

module (N/search)

SuiteScript 2.0

Search.runPaged(options)

{Search}.runPaged({pageSize: {number}})

N/search Module
Search.runPaged()
Method Description: Runs the current search and returns summary information about paginated results. Calling this method does not give you the result set or save the search. To retrieve data, use PagedData.fetch(options). When you use this method to run a paged search, consider the following: Search result sets are not cached. If records applicable to your search are created, modified, or deleted at the same time you are traversing your result set, your result set may change. This method can return a maximum of 1000 pages of search results.
Returns: search.PagedData
Supported Script Types: All script types For more information, see SuiteScript 2.0 Script Types.
Governance: 5 units
Module: N/search Module
Since: 2016.1
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Search.runPaged(options)

Example:

// Code Example 1
//Add additional code
//...
var mySearch = search.create({
type: search.Type.CUSTOMER
});

// Run the paged search
var pagedData = mySearch.runPaged({
pageSize: 50
});
//...
// Use the count property to count the
// search results easily
var resultCount = mySearch.runPaged({
pageSize: 50
}).count;
//...
//Add additional code

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