List.addColumn(options)
Method Description |
Adds a column to a list. |
Returns |
serverWidget.ListColumn object |
Supported Script Types |
Suitelets For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2015.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The internal ID of this column. The internal ID must be in lowercase, contain no spaces. |
2015.2 |
|
string |
required |
The label for this column. |
2015.2 |
|
string |
required |
The field type for this column. Set this value using the serverWidget.FieldType enum.
Note:
Not all field types are supported. Check supported values in serverWidget.FieldType |
2015.2 |
|
string |
optional |
The layout justification for this column. Set this value using the serverWidget.LayoutJustification enum. The default value is |
2015.2 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/ui/serverWidget Module Script Samples.
//Add additional code
...
var list = serverWidget.createList({
title : 'Simple List'
});
list.addColumn({
id : 'column1',
type : serverWidget.FieldType.TEXT,
label : 'Text',
align : serverWidget.LayoutJustification.RIGHT
});
...
//Add additional code