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
- ARR and MRR Switch Feature for Enhanced Revenue Insights
The ARR and MRR switch feature in NetSuite 2026.1 improves data visibility and revenue insights for strategic analysis.
- Transfer Saved Searches to Analytics Warehouse in NetSuite 2026.2
Transfer saved searches to NetSuite Analytics Warehouse in version 2026.2 for enhanced data analysis and improved usability.
- NetSuite Analytics Warehouse Configuration Enhancements 2026.1
NetSuite Analytics Warehouse configuration page redesigned in 2026.1, enhancing usability and resource access.
- Class, Department, and Location Features in NetSuite 2026.1
Class, Department, and Location features improve insights and reporting in NetSuite 2026.1. Introduction With the release of NetSuite 2026.1, Intelligent
Advertising
Reach SuiteAnalytics Professionals
Put your product in front of NetSuite experts who work with SuiteAnalytics every day.
Sponsor This Category