AssistantStep.getLineCount(options)

Method Description

Gets the number of lines on a sublist in a step.

Note:

The first line number on a sublist is 0 (not 1).

Returns

number (the count of line items on a sublist)

Note:

if the sublist does not exist, -1 is returned.

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

string

required

The sublist internal ID.

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'
});
var assistantStep = assistant.addStep({
    id : 'idname',
    label : 'Sample label'
});
var sublist = assistant.addSublist({
    id : 'sublistid',
    type : serverWidget.SublistType.INLINEEDITOR,
    label : 'Editor'
});
var numLines = assistantStep.getLineCount({
    group : 'sublistid'
});
...
//Add additional code 

        

Related Topics

General Notices