Workbook Object Members Overview in SuiteScript
The Workbook object in SuiteScript allows for data analysis with pivot tables and custom tables, enhancing reporting capabilities.
TL;DR
The Workbook object in SuiteScript provides developers with essential functionalities for analyzing datasets through customizable workbooks, including supporting methods for data manipulation and retrieval. This feature is pivotal for creating dynamic reports within NetSuite.
What is the Workbook Object?
The Workbook object serves as a crucial component in SuiteScript, designed for analyzing the results of dataset queries. By using different components such as table views and pivots, it allows developers to create workbooks that can incorporate multiple datasets. A single dataset can be the foundation for various workbooks, facilitating diverse analytical perspectives.
Members of the Workbook Object
The Workbook object comprises several members, including methods and properties which facilitate its functionalities. Below is a list of available members:
| Member Name | Type | Return Type | Supported Script Types | Description |
|---|---|---|---|---|
Workbook.runPivot(options) | Method | workbook.PivotIntersection[] | Server scripts | Executes a pivot in the workbook and returns intersections. |
Workbook.description | Property | string | Server scripts | Provides the description of the workbook. |
Workbook.id | Property | string | Server scripts | The unique ID of the workbook. |
Workbook.name | Property | string | Server scripts | The name assigned to the workbook. |
Workbook.pivots | Property | workbook.Pivot[] | Server scripts | Lists the pivots included in the workbook. |
Workbook.tables | Property | workbook.Table[] | Server scripts | Details the tables present in the workbook. |
Method Functionality: runPivot
The runPivot(options) method is pivotal for executing pivots within a workbook. It returns an array of pivot intersections, enabling users to interact with the analytical data effectively. Below is the syntax:
1var myWorkbook = workbook.load({2 id: myWorkbookId,3});4var myResultSet = myWorkbook.runPivot({5 id: myTableId,6});7log.debug({8 title: 'My Run Pivot Result Set: ',9 details: myResultSet10});Usage and Governance
This method incurs a governance cost of 10 units for each intersection returned, so it's important to consider performance and cost when designing workflows that leverage this functionality.
Who This Affects
- Developers: Leverage the Workbook object in SuiteScripts for custom reporting.
- Administrators: Streamline data analysis and reporting processes utilizing this object.
Key Takeaways
- The Workbook object facilitates complex data analysis within NetSuite.
- Developers can utilize various members to create, manipulate, and extract data from workbooks.
- Efficient data retrieval methods like
runPivot()enable advanced reporting functionalities.
Source: This article is based on Oracle's official NetSuite documentation.
Frequently Asked Questions (4)
Can the Workbook object be used in client scripts like Suitelets or User Event scripts?
How does the runPivot() method affect script governance in NetSuite?
Does the Workbook object allow for the inclusion of multiple datasets in a single workbook?
Are there any unique identifiers associated with each workbook created using the Workbook object?
Was this article helpful?
More in Projects
- Field Service Management Enhancements in NetSuite
Discover recent enhancements to Field Service Management in NetSuite, including improved scheduling and real-time data access.
- Program Feature Enhancements in NetSuite 2026.1
NetSuite 2026.1 introduces key enhancements to the FSM Program feature, streamlining Case and Task automation for projects.
- NetSuite Field Service Management Feature Compatibility
NetSuite Field Service Management compatibility levels define the interaction of features with FSM functionality.
- New Project Manager Role in NetSuite 2025.2
New Project Manager role in NetSuite 2025.2 grants access to project management features with predefined permissions.
Advertising
Reach Projects Professionals
Put your product in front of NetSuite experts who work with Projects every day.
Sponsor This Category