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
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- Set Sublist Field Values in SuiteScript 2.x for Record Management
Set sublist field values in SuiteScript 2.x for effective record management using standard and dynamic modes.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
- 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.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category