I'm adding a select field to a suitelet. And I wan...
# suitescript
e
I'm adding a select field to a suitelet. And I want the user to be forced to select an option before submitting the form.... I use this code below... but this still allows the user to skip choosing an option for Produced By. Anyone have any ideas that would make this show the "You must select an option for Produced By" warning?
_var_ producedSelectField = _form_.addField({
id: 'custpage_show_producedby',
label: 'Produced By',
type: _serverWidget_.FieldType.SELECT
}).updateBreakType({
breakType: _serverWidget_.FieldBreakType.STARTCOL
});
_producedSelectField_.isMandatory = true;
_producedSelectField_.addSelectOption({
value: '',
text: '',
isSelected: true
});
_for_ (producer _of_ allProducers) {
_producedSelectField_.addSelectOption({
value: producer,
text: producer,
isSelected: false
});
}