Assistant object method · N/ui/serverWidget

addField()

Assistant.addField(options)

Adds a field to an assistant.

Implementation
Not started
Design
Open for proposals suggest how it should read
Proposals
A
Signature
Assistant.addField(options)
Returns
serverWidget.Field
Governance
None
Script types
Suitelets
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2015.2
call shapefrom Oracle's parameter table
1objAssistant.addField({2    id:        /* string, required */,3    label:     /* string, required */,4    type:      /* string, required */,5    source:    /* string, optional */,6    container: /* string, optional */7});
Oracle reference for this method
ParameterTypeRequiredDescription
options.idstringrequiredThe internal ID for this field.
options.labelstringrequiredThe label for this field.
options.typestringrequiredThe field type. Use the serverWidget.FieldType enum to set this value. Note: If you have set the type parameter to SELECT or MULTISELECT , and you want to add custom options to the select field, you must set source to NULL. Then, when a value is specified, the value will populate the options from the source. Important: Long text fields created with SuiteScript have a character limit of 100,000. Long text fields created with Suitebuilder have a character limit of 1,000,000.
options.sourcestringoptionalThe internalId or scriptId of the source list for this field. Use this parameter if you are adding a select (List/Record) or multi-select type of field. For radio fields only, the source parameter is not an optional parameter, it must contain the radio button's unique internal ID. The id parameter contains the ID that identifies all the radio buttons of the same group. Note: If you want to add custom options on a select or multi-select field, you must set the source parameter to NULL , and then add the custom options using Field.addSelectOption(options) . Important: After you create a select or multi-select field that is sourced from a record or list, you cannot add additional values with Field.addSelectOption(options) . The select values are determined by the source record or list.
options.containerstringoptionalThe internal ID of the field group to place this field in.
B

No Mynt syntax yet.

Nothing in the language compiles to Assistant.addField(options) today. How should it read?

C

Competing syntax for addField, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

Loading proposals from GitHub…

D

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, save and Ref[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?

N/ui/serverWidget · Assistant.addField(options)

Suggest syntax for addField