DimensionSelector Object Members in SuiteScript
The DimensionSelector object in SuiteScript facilitates creating path selectors, filters, and sort definitions for enhanced data manipulation.
The DimensionSelector object is a crucial component in SuiteScript that enables developers to create various selectors and filters for enhancing data workflows. It is extensively utilized within methods for defining how data dimensions are represented and manipulated within SuiteAnalytics workbooks.
What is the DimensionSelector Object?
The DimensionSelector object is employed when creating path selectors, sort definitions, conditional filters, limiting filters, or measure sorts. It is initialized using the workbook.createDimensionSelector(options) method. The object forms part of the N/workbook SuiteScript module.
Utilizing the DimensionSelector, developers can create tailored data representations and refine how analytics are executed in their custom applications.
DimensionSelector Object Members
The DimensionSelector includes several members that contribute to its functionality:
| Member Name | Type | Supported Script Types | Description |
|---|---|---|---|
DimensionSelector.dimension | workbook.DataDimension, workbook.Section | Server scripts | Represents the dimension of the selector. |
Supported Script Types
This object is applicable in Server Scripts. For more details, refer to the SuiteScript 2.x Script Types.
Syntax Example 1: Creating a Dimension Selector
Below is a syntax example showcasing how to create a DimensionSelector object:
var myDimensionSelector = workbook.createDimensionSelector({ dimension: myDataDimension});Syntax Example 2: Accessing the Dimension Property
Here's another code sample demonstrating how to access the dimension property of a DimensionSelector object:
var theDimension = myDimensionSelector.dimension;Error Handling
During implementation, developers should be aware of potential errors. For instance, if an incorrect parameter type is set for the dimension, the following error will be thrown:
- Error Code:
WRONG_PARAMETER_TYPE- Condition: The value specified is not a
workbook.DataDimensionor aworkbook.Section.
- Condition: The value specified is not a
Knowing how to handle these errors effectively is crucial for maintaining script integrity and avoiding runtime issues.
Conclusion
The DimensionSelector object in SuiteScript is essential for creating sophisticated data selectors that enhance the analysis capabilities of SuiteAnalytics workbooks. By understanding its members and usage, developers can leverage its full potential in their applications.
Key Takeaways
- The
DimensionSelectoris key for creating effective analytics in SuiteScript. - It is used to define dimensions for various selectors and filters.
- Error handling is vital to ensure proper object usage in scripts.
Frequently Asked Questions (4)
Does the DimensionSelector object apply to both server and client scripts?
How is the DimensionSelector object initialized in SuiteScript?
What happens if an incorrect parameter type is used for the dimension property in DimensionSelector?
How can developers access the dimension property of a DimensionSelector object?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Custom Tool Script Enhancements in NetSuite
Custom tool scripts in NetSuite gain execution log support and a new management page in February 16, 2026.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
