SuiteScript 2.x API Reference
SuiteScript 2.1 is now the standard scripting version. 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.
The SuiteScript 2.1 API includes global objects such as the define Object and the require Function, and modules which are organized based on behavior.
-
Global objects can be used in your scripts without loading them as dependencies. The global objects in SuiteScript 2.1 are: define Object, require Function, log Object, util Object, toString(), JSON object, Promise Object, and Iterator. See SuiteScript 2.1 Global Objects for information about all SuiteScript 2.1 global objects.
-
SuiteScript 2.1 modules provide specific functionality. Each module can be loaded in your script to access its associated functionality. For example, you can load the N/file module to access and use file-related functionality. For a list of all SuiteScript 2.1 modules, see SuiteScript 2.1 Modules.
If you are converting a SuiteScript 1.0 script to SuiteScript 2.1, the SuiteScript 1.0 to SuiteScript 2.1 API Map topic will be helpful. That topic provides a mapping between SuiteScript 1.0 APIs (both nlapi functions and nlobj objects) and their corresponding SuiteScript 2.1 APIs.