Field.getSelectOptions(options)
Method Description |
Obtains an array of available options on a dropdown select, multi-select, or radio field. The internal ID and label of the field options are returned as name/value pairs.
Important:
You can use this method only in dynamic mode. For additional information about dynamic mode, see CurrentRecord.isDynamic. |
Returns |
array This function returns an array in the following format:
This function returns If you attempt to get select options on a field that is not a dropdown select field, such as a popup select field or a field that does not exist on the form, Because the maximum value for the Maximum Entries in Dropdowns settings is 500, the maximum number of options that can be returned is 500.
Note:
A call to this method may return different results for the same field for different roles. |
Governance |
None |
Supported Script Types |
Client scripts For more information, see SuiteScript 2.x Script Types. |
Module |
|
Since |
2016.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The search string to filter the select options that are returned.
Note:
Filter values are case insensitive. |
2016.2 |
|
string |
required |
The following operators are supported:
|
2016.2 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/currentRecord Module Script Samples.
//Add additional code
...
var options = objField.getSelectOptions({
filter : 'C',
operator : 'startswith'
});
...
//Add additional code