Modules
Objects/Functions
SuiteScript 2.0
{dataset}.createColumn({alias: {string},fieldId: {string},formula: {string},join: {dataset.Join},id: {number},label: ${7:string},type: ${8:string}})
N/dataset Module
dataset.createColumn()
Method Description:
Creates a dataset column based on a field or on a formula and a type.
Returns:
dataset.Column
Supported Script Types:
Server scripts
For more information, see SuiteScript 2.0 Script Types.
Governance:
None
Module:
N/dataset Module
Sibling Module Members:
N/dataset Module Members
Since:
2020.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=dataset.createColumn(options)
Example:
// Code Example 1
// Add additional code
//...
// Create a field column
var myFieldColumn = dataset.createColumn({
fieldId: 'name',
name: 'My Field Column'
});
// Create a formula/type column
var myFormulaColumn = dataset.createColumn({
formula: '{email}',
type: 'STRING',
id: 11,
label: 'My Formula Column'
});
// Create a join column
var myJoinColumn = dataset.createColumn({
fieldId: 'name',
join: myJoin // Create this using dataset.createJoin
});
//...
// Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_158990102328.html