Workbook.runPivot(options)

Note:

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

Method Description

Runs the pivot and returns an array of pivot intersections.

Returns

workbook.PivotIntersection[]

Supported Script Types

Server scripts

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

Governance

10 units for each intersection returned

Module

N/workbook Module

Parent Object

workbook.Workbook

Sibling Object Members

Workbook Object Members

Since

2021.2

Parameters

Parameter

Type

Required / Optional

Description

options.id

string

required

The ID of the pivot.

Errors

Error Code

Thrown If

PIVOT_DOES_NOT_EXIST

The pivot specified by the options.id parameter is not included in the workbook.

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/workbook Module Script Samples.

            // Add additional code
...
var myWorkbook = workbook.load({
    id: myWorkbookId,
});
var myResultSet = myWorkbook.runPivot({
    id: myTableId,
});
log.debug({
    title: 'My Run Pivot Result Set: ',
    details: myResultSet
});
...
// Add additional code 

          

Related Topics

workbook.Workbook
N/workbook Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices