Portlet.addEditColumn(options)

Method Description

Adds an Edit or Edit/View column to the portlet.

Returns

serverWidget.ListColumn

Entry Point

render(params)

Since

2016.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.column

string

required

The internal ID of the column to the left of which the Edit/View column is added.

2016.2

options.showHrefCol

string

optional

If set, it must contain a name of a column.

The value of the column determines whether the View/Edit link is clickable for a given data row (T=clickable, F=non-clickable).

2016.2

options.showView

boolean

optional

If true, then an Edit/View column is added. Otherwise, only an Edit column is added.

The default setting is false.

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

The following code snippet shows the syntax for this member. It is not a functional example. For a complete script example, see SuiteScript 2.x Portlet Script Type.

          ...
var portlet = params.portlet;
portlet.title = 'My Detailed List';
portlet.addColumn({ id: 'internalid', type: serverWidget.FieldType.TEXT, label: 'Number', align: serverWidget.LayoutJustification.LEFT
});
portlet.addColumn({ id: 'entityid', type: serverWidget.FieldType.TEXT, label: 'Name', align: serverWidget.LayoutJustification.LEFT
});
portlet.addEditColumn({ column: 'entityid', showView: true, showHrefCol: true, link: '/app/common/entity/custjob.nl', linkParam: 'internalid', linkParamName: 'id',
});
... 

        

Related Topics

Portlet Object
Portlet.addColumn(options)
Portlet.addField(options)
Portlet.addLine(options)
Portlet.addRow(options)
Portlet.addRows(options)
Portlet.setSubmitButton(options)
Portlet.clientScriptFileId
Portlet.clientScriptModulePath
Portlet.html
Portlet.title

General Notices