serverWidget.Tab

Object Description

A tab or subtab on a serverWidget.Form object.

You can add a new tab or subtab to a form using one of the following methods:

The internal ID must be in lowercase, contain no spaces, and include the prefix custpage if you are adding the field to an existing page.

Note:

To enable your tab to appear on your form, there must be at least one object assigned to the tab. Otherwise, the tab will not appear.

Note:

If you have less than two tabs on your form, the tab will not appear. Instead the fields assigned to the tab will appear at the bottom of the form.

For a complete list of this object’s properties, see Tab Object Members.

Supported Script Types

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

Module

N/ui/serverWidget Module

Since

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 tab = form.addTab({
    id : 'tabid1',
    label : 'Tab 1'
});

var tab = form.addTab({
    id : 'tabid2',
    label : 'Tab 2'
});

form.addField({
      id : 'custpage_tabid1',
     type: ui.FieldType.TEXT,
     label: 'Tab 1 Field'
});

form.addField({
     id : 'custpage_tabid2',
     type: ui.FieldType.TEXT,
     label: 'Tab 2 Field'
});...
//Add additional code 

        

Related Topics

General Notices