SuiteScript 2.x Script Creation Process

Here’s the basic process flow for creating a SuiteScript 2.x script. For a more detailed explanation with a sample script, check out SuiteScript 2.x Hello World. If you want to see a diagram of a valid script’s structure, see SuiteScript 2.x Anatomy of a Script.

Stage

Description

Additional Information

1

Use the define() function to load SuiteScript 2.0 modules in your entry point script. This is the script you attach to the script record.

Modular Architecture

SuiteScript 2.x Global Objects

2

Add the required JSDoc tags to your entry point script.

SuiteScript 2.x JSDoc Validation

3

Add at least one entry point function to your script. An entry point function is a named function that runs when an entry point is triggered.

Important:

Your entry point script can only use one script type. For example, it can’t return both a beforeLoad entry point and an onRequest entry point.

SuiteScript 2.x Script Types

4

Organize your supporting code into custom modules (instead of SuiteScript 1.0 libraries). Create these modules with the define() function, then load them in your entry point script.

SuiteScript 2.x Global Objects

5

Upload and deploy your script to NetSuite.

SuiteScript 2.x Entry Point Script Creation and Deployment

Related Topics

General Notices