Modules

filter

 

Objects/Functions

module (N/currentRecord)

SuiteScript 2.0

Field.insertSelectOption(options)

{Field}.insertSelectOption({value: {string},text: {string},isSelected: {boolean}})

N/currentRecord Module
Field.insertSelectOption()
Method Description: Inserts an option into certain types of select and multiselect fields. This method is usable only in select and multiselect fields that were added by a front-end Suitelet or beforeLoad user event script. The IDs for these fields always have a prefix of custpage.
Returns: Void
Governance: None
Supported Script Types: Client scripts For more information, see SuiteScript 2.0 Client Script Type.
Module: N/currentRecord Module
Since: 2016.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Field.insertSelectOption(options)

Example:

// Code Example 1
//Add additional code
//...

// Instantiate the field. Note that this method is supported only
// on fields whose fieldIds have a prefix of custpage.

var field = call.getField({
fieldId: 'custpage_select1field'
});


// Insert a new option.

field.insertSelectOption({
value: 'Option1',
text: 'alpha'
});
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4779675098.html