List.addColumn(options)

Method Description

Adds a column to a list.

Returns

serverWidget.ListColumn object

Supported Script Types

SuiteScript 2.x Suitelet Script Type

Governance

None

Module

N/ui/serverWidget Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.id

string

required

The internal ID of this column.

The internal ID must be in lowercase, contain no spaces.

2015.2

options.label

string

required

The label for this column.

2015.2

options.type

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

options.align

string

optional

The layout justification for this column. Set this value using the serverWidget.LayoutJustification enum.

The default value is LEFT.

2015.2

Syntax
Important:

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 

        

Related Topics

General Notices