SuiteScript 2.x Client Script Type

Client scripts are scripts that are executed by predefined event triggers in the client browser. They validate user-entered data and auto-populate fields or sublists during form events. For details, see SuiteScript 2.x Client Script Entry Points and API.

Scripts can be run on most standard records, custom record types, and custom NetSuite pages such as Suitelets. See SuiteScript Supported Records for a list of NetSuite records that support SuiteScript.

Important:

Client scripts only execute when you're in edit mode. If you've got a deployed client script with a pageInit entry point, it doesn't run when you view the form. It executes when you click Edit.

The following triggers can run a client script:

Record-level client scripts run after form-based clients and before user event scripts.

See Script Type Usage Unit Limits for details about client script governance.

Tip:

You can set the order in which client scripts execute on the Scripted Records page. See The Scripted Records Page.

You can use SuiteCloud Development Framework (SDF) to manage client scripts in your file-based customization projects. For information about SDF, see SuiteCloud Development Framework. You can use the Copy to Account feature to copy an individual client script to another of your accounts. Each client script page has a clickable Copy to Account option in the upper right corner. For information about Copy to Account, see Copy to Account.

You can use SuiteScript Analysis to learn about when the script was installed and how it performed in the past. For more information, see Analyzing Scripts.

For additional information about SuiteScript 2.x client scripts, see the following:

Related Topics

General Notices