SuiteScript 1.0 and SuiteScript 2.1 Script Type Differences
SuiteScript 2.1 supports the script types available in SuiteScript 1.0, but the two versions differ in script structure, entry point names, context objects, and APIs.
SuiteScript 2.1 also includes script types that have no SuiteScript 1.0 equivalent:
-
Map/Reduce scripts process large volumes of data in stages.
-
SDF installation scripts perform tasks when a SuiteApp is deployed with SuiteCloud Development Framework (SDF).
-
Custom Tool scripts expose NetSuite functionality to external AI clients through the NetSuite AI Connector Service.
SuiteScript 1.0 uses event functions, such as beforeLoad, to respond to events. In SuiteScript 2.1, standard script types use entry point functions for corresponding events or actions. A SuiteScript 2.1 entry point function generally receives a context object instead of separate arguments.
Custom Tool scripts are an exception. Their available operations and input parameters are defined by a JSON-RPC schema rather than by a fixed set of standard entry points.
For more information about SuiteScript 2.1 entry points, see SuiteScript 2.1 Entry Point Script Creation and Deployment.
These topics group the script-type differences by purpose: