DataDimension Object Members
Explore the DataDimension object members in SuiteScript, including properties like children and items for effective workbook customization.
The DataDimension object provides essential properties for manipulating data dimensions in SuiteScript workbooks. It allows developers to create dynamic categories, legends, and pivot axes efficiently, making it crucial for those utilizing SuiteScript in reporting and analytics.
What Members Are Available for DataDimension?
The following members are part of the workbook.DataDimension object:
| Member Name | Return Type | Supported Script Types | Description |
|---|---|---|---|
DataDimension.children | Array<workbook.DataDimension or workbook.Section> | Server scripts | Retrieves the children of the data dimension. |
DataDimension.items | Array<workbook.DataDimensionItem> | Server scripts | Provides the items belonging to the data dimension. |
DataDimension.totalLine | string | Server scripts | Defines the formatting option for the total line. Set this value using workbook.TotalLine. |
Object Description
The DataDimension object is versatile and can be utilized to create categories, legends, pivot axes, dimension selectors, or sections. You can create this object via the workbook.createDataDimension(options) method, which accepts various parameters to customize the dimension’s behavior.
Code Sample
The following code demonstrates how to create a DataDimension object with its members:
1// Creating a DataDimension object2var myDataDimension = workbook.createDataDimension({3 items: [myDataDimensionItem],4 children: [myMeasure],5 totalLine: workbook.TotalLine.FIRST_LINE6});7 8// Accessing the children property9var theChildren = myDataDimension.children;Supported Script Types
The DataDimension object is only available in server-side scripts. Ensure to refer to the SuiteScript 2.x Script Types for more information on applicable environments.
Error Handling
If improper values are assigned to the properties of the DataDimension, an error might be thrown:
- Error Code:
WRONG_PARAMETER_TYPE- Thrown If: The value specified is not a valid
workbook.DataDimension[]orworkbook.Section[].
- Thrown If: The value specified is not a valid
By understanding and correctly utilizing the DataDimension object members, developers can enhance their workbooks significantly, ensuring better data visualization and reporting capabilities.
Key Takeaways
- The DataDimension object is vital for creating structured data presentations in SuiteScript workbooks.
- It includes properties for children and items, which aid in hierarchical data representation.
- Proper error handling, especially with parameter types, is crucial for robust script development.
Frequently Asked Questions (4)
Is the DataDimension object available for use in client-side scripts?
What should I do if I encounter the 'WRONG_PARAMETER_TYPE' error with DataDimension?
Can I use the DataDimension object to create pivot axes in SuiteScript workbooks?
How can I create a DataDimension object with specific items and children?
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