Modules
Objects/Functions
SuiteScript 2.0
// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=workbook.Category for more information.
N/workbook Module
workbook.Category
Object Description:
A category. Categories are used when you create a chart definition.
You can create a category using workbook.createCategory(options).
Supported Script Types:
Server scripts
For more information, see SuiteScript 2.0 Script Types.
Module:
N/workbook Module
Methods and Properties:
Category Object Members
Since:
2020.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=workbook.Category
Example:
// Code Example 1
// Add additional code
//...
// Create a Category based on a Section
var myCategory = workbook.createCategory({
axis: myChartAxis,
root: mySection,
sortDefinitions: [mySortDefinition]
});
// Create a Category based on a DataDimension
var myCategory = workbook.createCategory({
axis: myChartAxis,
root: myDataDimension,
sortDefinitions: [mySortDefinition]
});
// View a workbook.Category used in a ChartDefinition
var myWorkbook = workbook.load ({
id: myWorkbookId
});
var myCategory = myWorkbook.chartDefinitions[0].category;
// Note that some Category properties may be empty/null based on the loaded workbook
log.audit({
title: 'Category axis = ',
details: myCategory.axis
});
log.audit({
title: 'Category root = ',
details: myCategory.root
});
log.audit({
title: 'Category sortDefinitions = ',
details: myCategory.sortDefinitions
});
//...
// Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_159007978137.html