Assistant.addFieldGroup(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Adds a field group to the assistant. A field group is a collection of fields that can be displayed in a one or two column format. Assign a field to a field group to label, hide or collapse a group of fields.

By default, the field group is collapsible and appears expanded on the assistant page. To change this behavior, set the FieldGroup.isCollapsed and FieldGroup.isCollapsible properties.

Returns

serverWidget.FieldGroup 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 for the field group.

2015.2

options.label

string

required

The label for the field group.

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 assistant = serverWidget.createAssistant({
    title : 'Simple Assistant'
});
assistant.addFieldGroup({
    id : 'idname',
    label : 'Sample label'
});
...
//Add additional code 

        

Related Topics

serverWidget.Assistant
N/ui/serverWidget Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices