SuiteScript 2.x API Reference
The SuiteScript 2.x 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.x are: define Object, require Function, log Object, util Object, toString(), JSON object, Promise Object, and Iterator. See SuiteScript 2.x Global Objects for information about all SuiteScript 2.x global objects.
-
SuiteScript 2.x 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.x modules, see SuiteScript 2.x Modules.
If you are converting a SuiteScript 1.0 script to SuiteScript 2.x, the SuiteScript 1.0 to SuiteScript 2.x 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.x APIs.