SuiteScript 2.x
You can use SuiteScript to extend and customize, search, and process your NetSuite data. SuiteScript enables full-featured application-level scripting capabilities that support sophisticated procedural logic for both client and server scripts, as well as robust debugging.
The latest major version, SuiteScript 2.0, extends the capabilities provided by the initial SuiteScript version with an API architecture familiar to JavaScript developers. SuiteScript 2.x refers to the latest minor version of SuiteScript. The most recent minor version of SuiteScript is 2.1. For more information about SuiteScript 2.1 and SuiteScript versioning, see SuiteScript 2.1, Executing Scripts Using SuiteScript 2.1, and SuiteScript Versioning Guidelines.
The following are the characteristics of SuiteScript 2.x:
-
SuiteScript 2.x is a JavaScript API that offers a broad range of options for enhancing and extending NetSuite. You can use SuiteScript to customize the behavior of a page, create custom workflows, schedule tasks, and much more.
-
SuiteScript 2.x's modularity supports encapsulation, provides intuitive code organization, and ensures there are no global variable or method naming conflicts. Automatic dependency management enables you to concentrate on logic instead of dependencies and load order.
-
SuiteScript 2.x is designed to support all standard JavaScript. The supplied SuiteScript 2.x APIs give you programmatic access to NetSuite functionality. For generic logic, you can use custom modules to load your preferred third party JavaScript APIs.
-
SuiteScript 2.x API enhances the APIs supported by the previous SuiteScript version with APIs for SFTP file transfer, data caching, search pagination, flat file streaming, and enhanced encryption, decryption, and hashing.
-
SuiteScript 2.x provides asynchronous processing through promises, map/reduce scripts that provide a structured framework for server scripts processing a large number of records, and support for all HTTP content types.
The SuiteScript 2.x API Introduction topic provides information to help you learn how to use SuiteScript 2.x including a Hello World sample, the script creation process, and a list of developer resources.
Several script types are supported in SuiteScript 2.x including client scripts, user event scripts, scheduled scripts, and more. Using SuiteScript 2.x, you can create custom modules and custom pages and you can script records and subrecords. The following topics provide all the information you need to work with SuiteScript 2.x:
To help you transition your scripts from SuiteScript 1.0 API to SuiteScript 2.x API, see Transitioning from SuiteScript 1.0 to SuiteScript 2.x.