Modules

filter

 

Objects/Functions

module (N/record)

SuiteScript 2.0

Field.getSelectOptions(options)

{Field}.getSelectOptions({filter: {string},operator: {string}})

N/record Module
Field.getSelectOptions()
Method Description: Returns an array of available options on a standard or custom select, multi-select, or radio field as key-value pairs. You can only use this method on a record in dynamic mode. For additional information on dynamic mode, see record.Record and SuiteScript 2.0 – Standard and Dynamic Modes.
Returns: array Only the first 1,000 available options are returned in an array. If there are more than 1,000 available options, an empty array [] is returned. This function returns an array in the following format: This function returns Type Error if the field is not a supported field for this method.
Supported Script Types: Client and server-side scripts For more information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/record Module
Sibling Object Members: Field Object Members
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Field.getSelectOptions(options)

Example:

// Code Example 1
[{value: 5, text: 'abc'},{value: 6, text: '123'}]

// Code Example 2
// Add additional code.
//...
var objRecord = record.load({
type: record.Type.SALES_ORDER,
id: 275
});

var objSublist = objRecord.getSublist({
sublistId: 'item'
});

var options = objField.getSelectOptions({
filter : 'C',
operator : 'startswith'
});

//Perform an action with the options array
//...
// Add additional code.

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