Dataset.runPaged()

Note:

The content in this help topic applies to SuiteScript 2.x.

Method Description

Executes the dataset and returns the result set as paginated data (the same as in N/query Module). The maximum number of results per page is 1000. The minimum number of results per page is 5, except for the last page, which may include fewer than 5 results.

Returns

query.PagedData

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

10 units

Module

N/dataset Module

Parent Object

dataset.Dataset

Sibling Object Members

Dataset Object Members

Since

2020.2

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.pageSize

number

required

The size of each page in the dataset results. The maximum allowed value is 1000. The minimum allowed value is 5.

The default page size is 50 results per page.

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/dataset Module Script Samples.

            // Add additional code
...
// Load a dataset and run it to get paged data results
var myDataset = dataset.load({
    id: myDatasetId
});
var myDatasetResultSet = myDataset.runPaged({
    pageSize: 15
});

log.audit({
    title: 'My Paged Data Result Set: ',
    details: myDatasetResultSet
});
...
// Add additional code 

          

Related Topics

dataset.Dataset
N/dataset Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices