Modules
Objects/Functions
SuiteScript 2.0
{Field}.removeSelectOption({value: {string}})
N/currentRecord Module
Field.removeSelectOption()
Method Description:
Removes a select option from certain types of select and multiselect fields.
This method is usable only in select 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
Supported Script Types:
Client scripts
For more information, see SuiteScript 2.0 Client Script Type.
Governance:
None
Module:
N/currentRecord Module
Since:
2016.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=Field.removeSelectOption(options)
Example:
// Code Example 1
//...
field.removeSelectOption({
value: null,
});
//...
// Code Example 2
//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'
});
// Remove the appropriate option.
field.removeSelectOption({
value: 'Option2',
});
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4780315055.html