SuiteScript 2.1 upgrade checklist
Oracle made SuiteScript 2.1 the standard in 2026.2. From 2027.1 SuiteScript 1.0 gets critical-issue support only, and from 2028.2 every script must be 2.1. This checklist helps you plan the move.
1. Make a list of every script
- Customization → Scripting → Scripts. Show the API Version column and sort by it.
- For each script, note its type (User Event, Client, Scheduled, Map/Reduce, Suitelet, RESTlet…), the number of active deployments, and who owns it.
- Bundled and SuiteApp scripts are updated by their vendor. Ask them for a 2.1 date.
2. SuiteScript 1.0 scripts: rewrite with N/ modules
1.0 code (nlapi… functions) can't just be re-tagged. Common replacements:
| SuiteScript 1.0 | SuiteScript 2.x |
|---|---|
nlapiLoadRecord | record.load |
nlapiSubmitRecord | rec.save() |
nlapiSubmitField | record.submitFields |
nlapiSearchRecord | search.create(...).run() or query.runSuiteQL |
nlapiLookupField | search.lookupFields |
nlapiGetContext | runtime.getCurrentScript() / runtime.getCurrentUser() |
nlapiLogExecution | log.debug / log.error |
nlapiRequestURL | https.get / https.post |
nlapiSendEmail | email.send |
The entry points change too: 1.0 uses function names set on the script record, 2.x returns an object such as { beforeSubmit, afterSubmit } from define.
3. SuiteScript 2.0 scripts: change the tag and test
- Change
@NApiVersion 2.0(or2.x) to@NApiVersion 2.1. - 2.1 runs on a newer JavaScript engine (ES2019+). You can now use
const,let, arrow functions, template strings andasync/awaitwith promise APIs. - Look for code that relied on the old engine's loose behaviour: non-standard syntax such as
for each…in, date strings parsed withnew Date('…')in a non-ISO format, duplicate variable names, and libraries written for older JavaScript. - Client scripts run in the browser and already behave like 2.1, so they are usually the easiest.
4. Test safely
- Do it in a sandbox first. Keep the old file so you can switch back.
- Set the new deployment to Testing status, which runs it only for the script owner, before releasing it.
- Watch execution logs and governance usage for a week after release.
Scan every script automatically (SuiteLens)
SuiteLens has a SuiteScript 2.1 upgrade readiness scanner. It reads every script in the account, gives each a score, lists the patterns that will break, and shows a 1.0 → 2.x API map for the functions it finds. It is read-only, so it never changes your scripts.