Form.updateDefaultValues(options)
Method Description |
Updates the default values of multiple fields on the form. |
Returns |
void |
Supported Script Types |
Suitelets User event scripts -beforeLoad entry point For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2016.1 |
Parameters
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
Object[] |
required |
An object containing an array of name/value pairs that map field names to field values. |
2016.1 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/ui/serverWidget Module Script Samples.
//Add additional code
...
var form = serverWidget.createForm({
title : 'Simple Form'
});
var field = form.addField({
id : 'custpage_text',
type : serverWidget.FieldType.TEXT,
label : 'Text'
});
form.updateDefaultValues({
custpage_text : 'Text Goes Here'
})
...
//Add additional code