List.addEditColumn(options)

Method Description

Adds a column containing Edit or Edit/View links to a Suitelet or Portlet list.

These Edit or Edit/View links appear to the left of a previously existing column.

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.column

serverWidget.ListColumn

required

Column that acts as a reference. The Edit/View column is added to the left of the column specified here.

2015.2

options.showHrefCol

Boolean

optional

If set to true, the URL for the link is clickable.

2015.2

options.showView

Boolean

optional

If true then an Edit/View column will be added. Otherwise only an Edit column will be added.

2015.2

options.link

string

optional

The Edit/View base link. (For example: /app/common/entity/employee.nl)

The complete link is formed like this: <link>?<linkParamName>=<row data from linkParam>. (For example: /app/common/entity/employee.nl?id=123)

2019.2

options.linkParam

string

optional

The internal ID of the field in the row data where to take the parameter from.

The default value is the value set in the options.column parameter.

Tip:

In most cases, the value to use here is internalid

2019.2

options.linkParamName

string

optional

The name of the parameter.

The default value is id.

2019.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: 'internalid',
    type: 'text',
    label: 'Number'
});   
list.addColumn({
    id: 'entityid',
    type: 'text',
    label: 'Name'
});
list.addEditColumn({
    column : 'entityid',
    showHrefCol: true,
    showView : true,
    link: '/app/common/entity/employee.nl',
    linkParam: 'internalid',
    linkParamName: 'id',
 });
... 
//Add additional code 

        

Related Topics

General Notices