serverWidget.SublistType
JavaScript does not include an enumeration type. The SuiteScript 2.x documentation uses the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. In this object, each key points to a read-only string value.
Enum Description |
Holds the string values for valid sublist types. This enum is used to define the |
Module |
|
Sibling Module Members |
|
Since |
2015.2 |
Values
Value |
Description |
---|---|
|
These types of sublists are both fully editable. The only difference between these types is their appearance in the UI:
|
|
|
|
This type of sublist has a fixed number of lines. You can update an existing line, but you cannot add lines to it.
Note:
To make a field within a LIST type sublist editable, use Field.updateDisplayType(options) and the enum serverWidget.FieldDisplayType to update the field display type to ENTRY. |
|
This type of sublist is read-only. It cannot be edited in the UI, and it is not available for scripting. |
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 form = serverWidget.createForm({
title : 'Simple Form with Inline Editor type Sublist'
});
var sublist = form.addSublist({
id : 'sublist',
type : serverWidget.SublistType.INLINEEDITOR,
label : 'Inline Editor Sublist'
});
...
//Add additional code
The following code sample shows how to make a field within a LIST type sublist editable by updating the fieldDisplayType to ENTRY.
//Add additional code
...
var form = serverWidget.createForm({
title : 'Simple Form with List type Sublist'
});
var sublist = form.addSublist({
id : 'sublist',
type : serverWidget.SublistType.LIST,
label : 'List Type Sublist'
});
var internalId = sublist.addField({
id : 'id',
label : 'Internal ID',
type : serverWidget.FieldType.TEXT
});
internalId.updateDisplayType({displayType: serverWidget.FieldDisplayType.ENTRY});
...
//Add additional code