SuiteScript 2.x Script Creation Process

The following is the basic process flow for SuiteScript 2.x script creation. For a more detail explanation with a sample script, see SuiteScript 2.x Hello World. For a diagram of a the anatomy of a valid script, see SuiteScript 2.x Anatomy of a Script.

Note:

Your specific process may vary, depending on the content of your script.

Stage

Description

Additional Information

1

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

Modular Architecture

SuiteScript 2.x Global Objects

2

Add required JSDoc tags to your entry point script.

SuiteScript 2.x JSDoc Validation

3

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

Important:

Your entry point script can implement only one script type. For example, your entry point script cannot return both a beforeLoad entry point and an onRequest entry point.

SuiteScript 2.x Script Types

4

Organize your supporting code into custom modules (as a replacement for SuiteScript 1.0 libraries). Create these modules with the define() function and 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