Sublist.setSublistValue(options)
Method Description |
Sets the value of a sublist field. |
Returns |
void |
Supported Script Types |
Suitelets User event scripts -beforeLoad entry point For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2015.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
string |
required |
The internal ID name of the line item field being set. |
|
number |
required |
The line number for this field.
Note:
The first line number on a sublist is 0 (not 1). |
|
string |
required |
The value for the field being set.
Note:
Checkbox fields accept string (âTâ/âFâ) values, not Boolean. |
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'
});
var sublist = form.addSublist({
id: 'sublist',
type: serverWidget.SublistType.INLINEEDITOR,
label: 'Inline Editor Sublist'
});
sublist.addField({
id: 'sublist',
type: ui.FieldType.TEXT,
label: 'Text Field'
});
sublist.setSublistValue({
id: 'sublist',
line: 2,
value: "Text"
});
...
//Add additional code