N/dataset Module Members Reference for SuiteScript
Understand the N/dataset module members, including their types and methods for SuiteScript developers.
The N/dataset module provides a variety of objects and methods essential for creating and manipulating datasets in SuiteScript. Understanding its members can greatly enhance your ability to work with SuiteAnalytics data effectively.
What are N/dataset Module Members?
The N/dataset module contains several key members that facilitate the management of datasets, including the definition of columns, conditions, and the creation of dataset objects. Here’s a concise overview of these members:
| Member Type | Name | Return Type / Value Type | Supported Script Types | Description |
|---|---|---|---|---|
| Object | dataset.Column | Object | Server scripts | Represents a column in the dataset, typically corresponding to a record field. |
| Object | dataset.Condition | Object | Server scripts | Defines a condition or set of conditions to apply to a dataset column. |
| Object | dataset.Dataset | Object | Server scripts | Represents the entire dataset, encompassing its columns, conditions, and joins. |
| Object | dataset.Join | Object | Server scripts | Represents a joined record utilized in the dataset. |
| Method | dataset.create(options) | dataset.Dataset | Server scripts | Creates a new dataset. |
| Method | dataset.createColumn(options) | dataset.Column | Server scripts | Creates a new column for the dataset. |
| Method | dataset.createCondition(options) | dataset.Condition | Server scripts | Creates a condition to be used in the dataset. |
| Method | dataset.createJoin(options) | dataset.Join | Server scripts | Establishes a join for the dataset. |
| Method | dataset.describe(options) | Object[] | Server scripts | Retrieves descriptive information about a dataset, including columns and their properties. |
| Method | dataset.list() | Object[] | Server scripts | Lists all existing datasets available. |
How Do You Use N/dataset Members?
Understanding how to work with dataset members can significantly streamline data manipulation in SuiteScript. Below are example syntax usages for creating columns and conditions:
Creating a Column
// Create a general columnvar myFieldColumn = dataset.createColumn({ fieldId: 'name', id: 7});Creating a Condition
1// Create a condition with an operator2var myCondition = dataset.createCondition({3 column: myNameColumn,4 operator: query.Operator.EQUAL,5 values: ['smith']6});Key Considerations
- Make sure to replace ID values with those that are valid for your specific NetSuite account when working with datasets.
- Review the SuiteScript 2.x Script Types documentation to understand the limitations and supported features within server scripts.
In Summary
The N/dataset module plays a crucial role for developers aiming to leverage SuiteAnalytics datasets effectively. Its structured approach facilitates diverse operational needs, contributing to enhanced data queries and reporting capabilities within NetSuite.
Frequently Asked Questions (4)
Do I need to enable any specific feature flag to use the N/dataset module in SuiteScript?
What types of scripts support the use of dataset members such as Column, Condition, and Join?
Can the N/dataset module be used for client scripts, or is it limited to server scripts only?
What happens if I use an invalid ID value when creating a dataset Column or Condition?
Was this article helpful?
More in SuiteAnalytics
- Support for Consolidated Reports and SuiteQL Tool in
Discover support for consolidated reports and the new SuiteQL tool in NetSuite, enhancing reporting capabilities and metadata access.
- Artificial Intelligence Enhancements in NetSuite
Discover enhancements in Artificial Intelligence within NetSuite, including new insights and dashboard capabilities for improved analytics.
- 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.
- MCP Standard Tools Enhancements for NetSuite 2026.1
MCP Standard Tools enhancements for NetSuite 2026.1 improve reporting capabilities for multi-subsidiary organizations.
Advertising
Reach SuiteAnalytics Professionals
Put your product in front of NetSuite experts who work with SuiteAnalytics every day.
Sponsor This Category