SuiteScript 2.1
Update scripts that use SuiteScript 1.0 or the SuiteScript 2.0 or 2.x version annotations to SuiteScript 2.1 by the 2028.2 release to ensure continued compatibility. For more information, see Transitioning To SuiteScript 2.1.
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.
SuiteScript 2.1 is now the standard scripting version and can be used for server and client scripts. For server scripts, the Graal runtime engine is used. This engine supports ECMAScript 2023 which lets you use new language capabilities and functions in your scripts and may also improve script performance. For client scripts, you can include functions and features supported by the ECMAScript version your browser uses.
SuiteScript 2.1 supports ECMAScript features, such as the spread operator to expand an iterable inside another object or array. You can use the spread operator to combine values from two objects into a new one. For more information about other powerful new language features supported in SuiteScript 2.1, see .
A few notes:
-
SuiteScript 2.1 provides AI-specific modules, including N/llm Module, N/documentCapture Module, and N/machineTranslation Module to help you incorporate generative AI, document data extraction, and language translation into NetSuite customizations.
-
You can debug SuiteScript 2.1 scripts using your browser's debugger. For more information about debugging SuiteScript 2.1 scripts, see Debugging SuiteScript 2.1 Scripts.
-
Some SuiteScript 2.1 features are not fully supported in client scripts, such as for subrecords. For example, you may get an error if your client script is deployed for All Records, since that includes subrecords. In this case, if you need to deploy to All Records, update your 2.1 client script to use ES5.1 features instead of newer ECMAScript ones. ECMAScript features.
-
SuiteScript 2.1 client scripts are not currently supported in the Scriptable Cart. For more information about the Scriptable Cart, see Scriptable Cart and SuiteScript for Scriptable Cart.
The SuiteScript 2.1 API Introduction topic provides information to help you learn how to use SuiteScript 2.1 including a Hello World sample, the script creation process, and a list of developer resources.
Several script types are supported in SuiteScript 2.1 including client scripts, user event scripts, scheduled scripts, and more. Using SuiteScript 2.1, 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.1:
To help you transition your scripts from SuiteScript 1.0 API to SuiteScript 2.1 API, see Transitioning from SuiteScript 1.0 to SuiteScript 2.1.