Field object method · N/ui/serverWidget
addSelectOption()
Field.addSelectOption(options)
Adds a select option to a dropdown list for a selectable field.
- Implementation
- Not started
- Design
- Open for proposals suggest how it should read
A
suitescript api
1objField.addSelectOption({2 value: /* string, required */,3 text: /* string, required */,4 isSelected: /* Boolean, optional */5});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.value | string | required | The internal ID of this select option. |
| options.text | string | required | The label for this select option. |
| options.isSelected | Boolean | optional | If set to true , this option is selected by default in the UI. The default value for this parameter is false . |
B
mynt syntax
No Mynt syntax yet.
Nothing in the language compiles to Field.addSelectOption(options) today. How should it read?
C
community proposals
Competing syntax for addSelectOption, from GitHub Discussions. Select two or more to compare them side by side.
Loading proposals from GitHub…
D
suggest an alternative
Write the Mynt you wish you could write.
A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.
- Clarity. Does it say what happens, without ceremony?
- Consistency. Does it read like
load,saveandRef[field]? - Expressiveness. Does it cover the cases people actually write?
- Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?