Form.clientScriptModulePath

Note:

The content in this help topic pertains to SuiteScript 2.0.

Property Description

The relative path to the client script file to be used in this form.

Use this property when attaching an on demand client script to a server script.

Note:

If you deploy a client script to a form using Form.clientScriptFileId or Form.clientScriptModulePath, using the N/log Module adds the logs to the deployment of the parent script. The parent script can be either a beforeLoad user event script or a SuiteScript 2.x Suitelet Script Type.

Type

string

Supported Script Types

SuiteScript 2.x Suitelet Script Type and SuiteScript 2.x User Event Script Type (beforeLoad(context))

Module

N/ui/serverWidget Module

Since

2016.2

Errors

Error Code

Thrown If

PROPERTY_VALUE_CONFLICT

You attempted to set this value when the Form.clientScriptFileId property value has already been specified. For more information, see Form.clientScriptFileId.

Syntax
Important:

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 
...
objForm.clientScriptModulePath = 'SuiteScripts/formBehavior.js';
...
//Add additional code 

        

Related Topics

serverWidget.Form
N/ui/serverWidget Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices