new nlobjField() → {nlobjField}
Return a new instance of nlobjField used for scriptable form/sublist field.
This object is READ-ONLY except for scripted fields created via the UI Object API using Suitelets or beforeLoad user events
- Source:
- nlapihandler_stubs.js, line 4171
Returns:
- Type
- nlobjField
Methods
-
addSelectOption(value, text, selected)
-
add a select option to this field (valid for select/multiselect fields). This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Argument Description value
string internal ID for this select option text
string display value for this select option selected
boolean <optional>
if true then this select option will be selected by default - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4402
-
getLabel() → {string}
-
return field label.
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 4193
Returns:
- Type
- string
-
getName() → {string}
-
return field name.
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 4182
Returns:
- Type
- string
-
getType() → {string}
-
return field type.
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 4204
Returns:
- Type
- string
-
isDisabled() → {boolean}
-
return true if field is disabled.
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 4237
Returns:
- Type
- boolean
-
isHidden() → {boolean}
-
return true if field is hidden.
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 4215
Returns:
- Type
- boolean
-
isMandatory() → {boolean}
-
return true if field is mandatory.
- Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 4226
Returns:
- Type
- boolean
-
setAlias(alias) → {nlobjField}
-
set the alias used to set the value for this field. Defaults to field name. This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description alias
string column used to populate the field (mostly relevant when populating sublist fields) - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4259
Returns:
- Type
- nlobjField
-
setBreakType(breaktype) → {nlobjField}
-
set the break type (startcol|startrow|none) for this field. startrow is only used for fields with a layout type of outside This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description breaktype
string break type used to add a break in flow layout for this field: startcol|startrow|none - Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 4330
Returns:
- Type
- nlobjField
-
setDefaultValue(value) → {nlobjField}
-
set the default value for this field. This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description value
string - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4270
Returns:
- Type
- nlobjField
-
setDisabled(disabled) → {nlobjField}
-
Disable field via field metadata. This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description disabled
boolean if true then field should be disabled. - Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 4283
Returns:
- Type
- nlobjField
-
setDisplaySize(width, height) → {nlobjField}
-
set the width and height for this field. This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description width
int height
int - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4365
Returns:
- Type
- nlobjField
-
setDisplayType(type) → {nlobjField}
-
set the display type for this field. This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description type
string display type: inline|normal|hidden|disabled|readonly|entry - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4316
Returns:
- Type
- nlobjField
-
setHelpText(help, inline) → {nlobjField}
-
set help text for this field. If inline is set on assistant pages, help is displayed inline below field This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Argument Description help
string field level help content (rich text) for field inline
string <optional>
if true then in addition to the popup field help, the help will also be displayed inline below field (supported on assistant pages only) - Since:
- 2009.2
- Source:
- nlapihandler_stubs.js, line 4391
Returns:
- Type
- nlobjField
-
setLabel(label) → {nlobjField}
-
set the label for this field. This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description label
string - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4248
Returns:
- Type
- nlobjField
-
setLayoutType(type, breaktype) → {nlobjField}
-
set the layout type and optionally the break type. This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Argument Description type
string layout type: outside|startrow|midrow|endrow|normal breaktype
string <optional>
break type: startcol|startrow|none - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4343
Returns:
- Type
- nlobjField
-
setLinkText(text) → {nlobjField}
-
set the text that gets displayed in lieu of the field value for URL fields.
Parameters:
Name Type Description text
string user-friendly display value in lieu of URL - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4353
Returns:
- Type
- nlobjField
-
setMandatory(mandatory) → {nlobjField}
-
make this field mandatory. This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description mandatory
boolean if true then field becomes mandatory - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4294
Returns:
- Type
- nlobjField
-
setMaxLength(maxlength) → {nlobjField}
-
set the maxlength for this field (only valid for certain field types). This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description maxlength
int maximum length for this field - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4305
Returns:
- Type
- nlobjField
-
setPadding(padding) → {nlobjField}
-
set the amount of emppty vertical space (rows) between this field and the previous field. This method is only supported on scripted fields via the UI Object API
Parameters:
Name Type Description padding
int # of empty rows to display above field - Since:
- 2008.2
- Source:
- nlapihandler_stubs.js, line 4376
Returns:
- Type
- nlobjField