N/dataset Module Members Reference for SuiteScript

Understand the N/dataset module members, including their types and methods for SuiteScript developers.

·2 min read·View Oracle Docs

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 TypeNameReturn Type / Value TypeSupported Script TypesDescription
Objectdataset.ColumnObjectServer scriptsRepresents a column in the dataset, typically corresponding to a record field.
Objectdataset.ConditionObjectServer scriptsDefines a condition or set of conditions to apply to a dataset column.
Objectdataset.DatasetObjectServer scriptsRepresents the entire dataset, encompassing its columns, conditions, and joins.
Objectdataset.JoinObjectServer scriptsRepresents a joined record utilized in the dataset.
Methoddataset.create(options)dataset.DatasetServer scriptsCreates a new dataset.
Methoddataset.createColumn(options)dataset.ColumnServer scriptsCreates a new column for the dataset.
Methoddataset.createCondition(options)dataset.ConditionServer scriptsCreates a condition to be used in the dataset.
Methoddataset.createJoin(options)dataset.JoinServer scriptsEstablishes a join for the dataset.
Methoddataset.describe(options)Object[]Server scriptsRetrieves descriptive information about a dataset, including columns and their properties.
Methoddataset.list()Object[]Server scriptsLists 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

suitescript
// Create a general column
var myFieldColumn = dataset.createColumn({
fieldId: 'name',
id: 7
});

Creating a Condition

suitescript
1// Create a condition with an operator
2var 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?
The article does not mention any specific feature flags required to use the N/dataset module. It is available for use in server scripts.
What types of scripts support the use of dataset members such as Column, Condition, and Join?
Dataset members such as Column, Condition, and Join are supported in server scripts as stated in the article.
Can the N/dataset module be used for client scripts, or is it limited to server scripts only?
The N/dataset module is specifically supported for server scripts according to the information provided in the article.
What happens if I use an invalid ID value when creating a dataset Column or Condition?
The article advises replacing ID values with those that are valid for your specific NetSuite account, but it doesn't specify the outcome if invalid IDs are used.
Source: N/dataset Module Members Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in SuiteAnalytics

View all SuiteAnalytics articles →