Hi,
I have built a Suitelet in suitescript 2.0. I have added a sublist to the form, and some body fields. When submitting the form, I am able to retrieve the body field values via the parameters, but I am not able to obtain the sublist via the parameters (execution log states the sublist is undefined).
Here is an example of the code I am using:
...
//GET
var form = ui.createForm({
title: 'myForm'
});
var valueField = form.addField({
id: 'custpage_value_field',
type: ui.FieldType.CURRENCY,
label: 'Total Value'
});
var sublist = form.addSublist({
id: 'custpage_sublist',
label: 'My Sublist',
type: ui.SublistType.LIST
});
...
...
//POST
var value = context.request.parameters.custpage_value_field;
var sublist = context.request.parameters.custpage_sublist;
log.debug ({ title: Value field:', details: 'Value Field = ' + value});
log.debug ({ title: 'Sublist:', details: 'Sublist = ' + sublist});
...
Script execution log:
| View | Debug | Value field: | 20/7/2020 | 3:41 PM | Value Field = 1000.00 |
| View | Debug | Sublist: | 20/7/2020 | 3:41 PM | Sublist = undefined |
Any help on what I am doing wrong, will be greatly appreciated.
Many thanks