Modules
Objects/Functions
SuiteScript 2.0
// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=Field.defaultValue for more information.
N/ui/serverWidget Module
Field.defaultValue
Property Description:
The default value for this field.
If you pass an empty string or any value that is not a number, such as undefined, the field defaults to a blank field in the UI.
This property is supported only on scripted fields created using the N/ui/serverWidget Module.
Type:
string
Supported Script Types:
SuiteScript 2.0 Suitelet Script Type and SuiteScript 2.0 User Event Script Type (beforeLoad(scriptContext))
Module:
N/ui/serverWidget Module
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=Field.defaultValue
Example:
// Code Example 1
//Add additional code
//...
var form = serverWidget.createForm({
title : 'Simple Form'
});
var field = form.addField({
id : 'custpage_textfield',
type : serverWidget.FieldType.TEXT,
label : 'Text'
});
field.defaultValue = 'Insert Text Here.';
//...
//Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4335275520.html