Form.addSublist(options)

Method Description

Add a sublist to a form.

Note:

If the row count exceeds 25, sorting is not supported on static sublists created using this method.

Returns

A serverWidget.Sublist object

Supported Script Types

SuiteScript 2.x Suitelet Script Type and SuiteScript 2.x User Event Script Type (beforeLoad(context))

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 name of the sublist.

The internal ID must be in lowercase, contain no spaces, and include the prefix custpage if you are adding the sublist to an existing page. For example, if you add a sublist that appears as Purchase Details, the sublist internal ID should be something equivalent to custpage_purchasedetails or custpage_purchase_details.

2015.2

options.label

string

required

The label for this sublist.

2015.2

options.tab

string

optional

The tab under which to display this sublist. If empty, the sublist is added to the main tab.

2015.2

options.type

string

required

The sublist type.

Use the serverWidget.SublistType enum to set the value.

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 form = serverWidget.createForm({
    title : 'Simple Form'
});
var sublist = form.addSublist({
    id : 'sublistid',
    type : serverWidget.SublistType.INLINEEDITOR,
    label : 'Inline Editor Sublist'
});
...
//Add additional code 

        

Related Topics

General Notices