Series Object Members in NetSuite SuiteScript Workbook API
Series object members in NetSuite SuiteScript define chart series for visual data representations using the workbook API.
The Series object in NetSuite SuiteScript is crucial for developers working with the workbook API to visualize data through charts. Understanding its members and how to interact with them is essential for efficient data presentation.
What is the Series Object?
The Series object represents a series within a workbook, primarily used to define chart elements. It allows developers to manage the aspects of the series effectively.
Series Object Members
The following table summarizes the available members for the workbook.Series object:
| Member Name | Type | Description | Supported Script Types |
|---|---|---|---|
Series.aspects | string | Aspects for the series. | Server scripts |
How to Create a Series
To create a Series object, you can use the workbook.createSeries(options) method. Below is an example demonstrating the creation and retrieval of a Series object:
1// Add additional code2...3// Create a Series4var mySeries = workbook.createSeries({5 aspects: [myAspect]6});7 8// View a workbook.Series used in a Chart9var myWorkbook = workbook.load({10 id: myWorkbookId11});12 13var mySeries = myWorkbook.charts[0].series[0];14 15log.audit({16 title: 'Series.aspects = ',17 details: mySeries.aspects[0]18});19...20// Add additional codeError Handling
It’s important to note that if a wrong parameter type is specified, particularly for the aspects property, an error will be triggered. The relevant error code is:
WRONG_PARAMETER_TYPE: Thrown if the value specified is not aworkbook.Aspect[].
Related Documentation
For more clarity on operations or further exploration, refer to:
- N/workbook Module
- SuiteScript 2.x Modules
- SuiteScript 2.x
Key Points
- The Series object is used within the workbook for chart definition.
- The
aspectsproperty specifies the specific attributes of the series. - Proper parameter handling is essential to avoid runtime errors.
Frequently Asked Questions (4)
How can I create a Series object in SuiteScript?
What happens if I specify a wrong parameter type for the aspects property?
Which script type supports the Series.aspects member?
Is the Series object used outside of chart definitions?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- 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.
