Modules

filter

 

Objects/Functions

module (N/ui/serverWidget)

SuiteScript 2.0

Form.addSecretKeyField(options)

{Form}.addSecretKeyField({id: {string*},restrictToScriptIds: {string | string[]*},label: {string*},restrictToCurrentUser: {boolean},container: {string}})

N/ui/serverWidget Module
Form.addSecretKeyField()
Method Description: Adds a secret key field to the form. This key can be used in crypto modules to perform encryption or hashing. The default maximum length for a secret key field is 32 characters. If needed, use the Field.maxLength property to change this value.
Returns: serverWidget.Field object
Supported Script Types: SuiteScript 2.0 Suitelet Script Type and SuiteScript 2.0 User Event Script Type (beforeLoad(scriptContext))
Governance: None
Module: N/ui/serverWidget Module
Since: 2016.1
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Form.addSecretKeyField(options)

Example:

// Code Example 1
//Add additional code
//...
var form = serverWidget.createForm({
title : 'Simple Form'
});
skField = form.addSecretKeyField({
id : 'password',
restrictToScriptIds : 'customscript_my_script',
label : 'Password',
restrictToCurrentUser : false
});
skField.maxLength = 64;
//...
//Add additional code

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