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.
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 SuiteAnalytics
- Class, Department, Location Features in NetSuite 2026.1
Class, Department, and Location features enhance financial processes in NetSuite 2026.1 for improved insights and reporting.
- New HTML Formulas in Search for NetSuite 2025.1
New HTML Formulas in Search introduced in NetSuite 2025.1 enhances security for saved searches. Starting in NetSuite 2025.1, the HTML Formulas in Search feature
- Export Pivot Tables to Excel in NetSuite 2024.2
Export Workbook pivot tables to Excel XLSX format starting with NetSuite 2024.2, enhancing data analysis and reporting capabilities.
- Consolidated Reports and SuiteQL in NetSuite 2026.1
Consolidated reports and SuiteQL enhance data access in NetSuite 2026.1. Discover key integration features.
Advertising
Reach SuiteAnalytics Professionals
Put your product in front of NetSuite experts who work with SuiteAnalytics every day.
Sponsor This Category