NetSuite

SuiteScript 2.1 Is Now the Standard: What It Means for Your NetSuite Scripts

NetSuite is phasing out SuiteScript 1.0, 2.0 and 2.x by 2028.2. See Oracle's timeline, the runtime changes that break scripts, and how to prepare.

IBT Cloud ERP Team NetSuiteSuiteScriptSuiteScript 2.1Cloud ERP
SuiteScript.2.1.Migration.

If your NetSuite account has been customised over the years, SuiteScript is almost certainly running behind the scenes. It drives approval logic, field defaulting, custom buttons, scheduled jobs, RESTlet integrations and much more.

With the 2026.2 release, Oracle made SuiteScript 2.1 the standard scripting model for new and existing scripts. It also announced that SuiteScript 1.0, SuiteScript 2.0 and the @NApiVersion 2.x annotation will be phased out over the next few releases. By 2028.2, every script must use SuiteScript 2.1, and legacy script versions will no longer run.

That can sound a long way off. But many accounts carry a large number of scripts, written by different developers over many years, often with little documentation. Before any code is changed, someone has to work out what each script does, whether it is still needed and how to prove it still works afterwards. In this article we cover what is changing, the technical differences that catch scripts out, and a practical plan to get your account ready.

/ What is changing?

Oracle is phasing out SuiteScript 1.0, SuiteScript 2.0 and 2.x over several releases. The change affects all SuiteScript 1.0 scripts and any script annotated @NApiVersion 2.0 or @NApiVersion 2.x. Oracle's published milestones are:

NetSuite releaseWhat happens
2026.2SuiteScript 2.1 becomes the standard scripting model for new and existing scripts.
2027.1SuiteScript 1.0 enters end-of-life support, covering critical issues only. For other problems, Oracle will ask you to convert the script to 2.1 first.
2028.1SuiteScript 1.0 scripts can no longer be deployed in new accounts (existing accounts can still deploy them). SuiteScript 2.0/2.x scripts run as SuiteScript 2.1 by default.
2028.2All new and existing scripts must use SuiteScript 2.1. Legacy script versions will no longer run.

Oracle's stated reasons are better performance, stronger security and alignment with modern JavaScript. In practice, 2.1 runs server scripts on a newer engine that follows ECMAScript 2023, so you can use let, const, arrow functions, spread operators and async/await (in supported modules). The older 2.0 runtime targets ECMAScript 5.1.

Dates can moveOracle's transition guide describes the removal as "expected" in 2028.2, so dates could still move. We recommend planning to the published timeline.

/ Under the hood: what actually changes in your code

SuiteScript 2.0 and 2.x: same API, different engine

For 2.0 and 2.x scripts, the N/ modules stay the same. The headline change is one line: set the JSDoc tag to @NApiVersion 2.1. The catch is that 2.1 uses a different runtime engine, and Oracle documents a number of behaviours that change as a result. Some cause an immediate error; others quietly change results, which is harder to spot.

A SuiteScript 2.1 Suitelet in a code editor, showing the @NApiVersion 2.1 tag, a define() call with an arrow function, and const declarations.
A SuiteScript 2.1 Suitelet: the @NApiVersion 2.1 tag, an arrow function in define(), and const declarations. Modern JavaScript like this runs on the 2.1 engine.
AreaSuiteScript 2.0SuiteScript 2.1
Reserved words (e.g. extends) used as namesAcceptedSyntax error
Assigning a variable with no var, let or constToleratedReferenceError
Reassigning a constSilently ignoredTypeError stops the script
for each...in loops and conditional catch (e if ...)AcceptedSyntax error
toSource()AvailableError
JSON.parse with trailing commasAcceptedError
JSON.stringify(new Error('...'))Includes the messageReturns {}
parseInt('08')No valueReturns 8
toLocaleDateString() defaultLong format (December 21, 2012)Short format (2012-12-21)
record.setValue() with 616.00Stores 616.0Stores 616
RESTlet post() returning a stringJSON.stringify applied automaticallyNot applied
RESTlet returning JSON (application/json)Arrives as a stringArrives as an object
DebuggingSuiteScript DebuggerBrowser debugger (Chrome DevTools)
The silent changes deserve the most attention. A date string, a parsed number or a RESTlet response that changes shape can flow into reports, integrations or downstream systems without any error being logged.

SuiteScript 1.0: a rewrite, not a version change

SuiteScript 1.0 uses global nlapi* functions and nlobj* objects. SuiteScript 2.1 is modular, so a 1.0 script has to be restructured and rewritten, not just re-tagged. Converting a script typically involves:

  • Adding the JSDoc tags (@NApiVersion 2.1, @NScriptType), a define() call and a return statement
  • Replacing each 1.0 call with the matching N/ module method, for example nlapiLoadRecord becomes record.load()
  • Passing a single options object instead of individual arguments
  • Updating entry points, which now receive a context object (for example, nlapiGetNewRecord() becomes context.newRecord in a user event script)
  • Watching for index changes: in client scripts, 1.0 line numbers start at 1, while 2.1 lines start at 0
  • Replacing 1.0 functions with no direct 2.1 equivalent, such as nlapiAddDays and nlapiAddMonths, with standard JavaScript or another NetSuite approach

Once the code is converted, the existing script record is pointed at the new file, and NetSuite updates its API version to 2.1. The converted file must keep the same script type as the original record.

/ What this means for your scripts

The work, and the deadline that matters most, depends on which version each script uses.

Script versionKey milestoneWhat it needsTypical effort
SuiteScript 1.0Critical-issue support only from 2027.1; stops running in 2028.2A rewrite to 2.1High: new structure, APIs and entry points
@NApiVersion 2.0Runs as 2.1 by default from 2028.1Re-tag to 2.1, fix incompatibilities, retestLow to medium
@NApiVersion 2.xRuns as 2.1 by default from 2028.1Re-tag to 2.1, fix incompatibilities, retestLow to medium
@NApiVersion 2.1NoneNothing for this changeNone

A few points are easy to miss:

  • 2028.1 is the real deadline for 2.0/2.x scripts. From that release they run on the 2.1 engine whether or not anyone has touched them. Any incompatibility will surface then, in production, rather than at a time you choose.
  • The API Version field is only a starting point. Oracle notes that you still need to review each script's source and dependencies to know whether code changes are required.
  • Some features still have their own version rules. Where a feature's documentation requires an older SuiteScript version, Oracle says to follow that requirement until the help content is updated.
  • Scripts from SuiteApps and bundles. If scripts in your account came with a third-party SuiteApp or bundle, ask the provider about their plan for SuiteScript 2.1.

/ Why it matters

Scripts usually sit on the processes a business can least afford to stop: order entry, invoicing, approvals, fulfilment and the integrations that connect NetSuite to everything else. Leaving the transition to the last release cycle creates three risks:

  • Silent changes in 2028.1. When 2.0/2.x scripts start running as 2.1 by default, a script can begin producing different numbers, dates or API responses without anyone editing it.
  • Reduced support from 2027.1. Once SuiteScript 1.0 is in end-of-life support, a non-critical issue with a 1.0 script will need converting before Oracle will look at it.
  • A compressed timeline. Every NetSuite account has to make this change by the same deadline, so experienced SuiteScript developers will be in high demand as 2028 approaches.

Common scripts at risk

  • User event scripts on transactions and records that set values, validate data or create related records
  • Client scripts on forms, especially those that work with sublist line numbers or dates
  • Scheduled and map/reduce scripts that process data in bulk overnight
  • RESTlets and Suitelets used by integrations, portals and custom pages, where response formats can change
  • Workflow action and mass update scripts that extend standard workflows and bulk updates
  • Bundle installation scripts and older customisations no one has looked at in years

/ Getting started

Oracle's guidance and our own experience point to the same five steps.

  1. Inventory every script not on 2.1. Go to Customization > Scripting > Scripts and filter by API Version. For a reusable list, create a saved search on script records with the criterion API Version is not 2.1, and include Name, ID, Script Type, API Version, Owner and Description. A SuiteAnalytics workbook grouped by API version or script type works too.
  2. Triage before you touch any code. Oracle recommends evaluating inactive, obsolete or duplicated scripts for retirement instead of migration. Rank the rest by business impact, and start the conversion work with a few low-complexity scripts so the team learns the process.
  3. Test 2.0/2.x server scripts in the 2.1 runtime first. In a sandbox, go to Setup > Company > Preferences > General Preferences and enable Execute SuiteScript 2.0 Server Scripts as 2.1 and Execute SuiteScript 2.x Server Scripts as 2.1. Existing scripts then run on the 2.1 engine without code changes. Scripts that fail validation keep running as 2.0, and you can switch the preferences back at any time. These preferences cover server scripts only.
  4. Convert, then review every line. Re-tag 2.0/2.x scripts and fix anything that breaks; rewrite 1.0 scripts. Oracle's SuiteScript Upgrade agent skill and the SuiteCloud Developer Assistant can speed up analysis and conversion. Oracle is clear that you must review all generated code, and that validation "is a static migration check, not a substitute for functional testing."
  5. Validate and roll out in phases. Test every entry point, plus sublists, searches, record operations, data handling and error handling. Confirm that deployment records and SDF objects still reference the correct files, and compare the results with the original script. Then move scripts to production in manageable groups and monitor execution logs before starting the next group.

/ How IBT can help

Converting code is only part of the job. The bigger effort is understanding what is in your account and proving the new scripts behave the way the business expects. The IBT Cloud ERP team can take you through the whole process.

1. Script stock take. We review every script and deployment in your account and record its version, type, status, owner and what it touches. You get a clear picture of exactly what is affected and how much work is involved.
2. Documentation of your scripts. We document what each script does in plain English: its purpose, the records and fields it reads or updates, when it runs and what it depends on. That documentation stays with you after the migration. It makes future support faster and gives your team a better understanding of how the account is configured.
Plain-English documentation, written for your team.
3. Switching off redundant scripts. Most accounts carry scripts that are no longer needed: replaced by standard features, duplicated, or left over from old processes. We identify them and help you retire them safely, so you only spend money converting the scripts that matter.
4. Rewriting and converting scripts to SuiteScript 2.1. Our developers rewrite SuiteScript 1.0 scripts and convert 2.0/2.x scripts to SuiteScript 2.1, fixing the runtime differences along the way. AI-assisted tools can speed up conversion, but Oracle is clear that every change still needs an experienced developer to review it.
5. UAT test scripts. We write user acceptance testing (UAT) test scripts: step-by-step scenarios your team can run in a sandbox to confirm each converted script works as intended before it goes live. They also give you a repeatable regression test for future NetSuite releases.

/ Final Thought

The SuiteScript 2.1 transition is not optional, and for 2.0/2.x scripts the practical deadline is 2028.1, not 2028.2. The upside is that it is a rare chance to clean up an account: retire what you no longer need, document what you keep, and move onto a modern, supported platform. Starting now means you can work through it in planned stages, rather than rushing to fix scripts as the deadline closes in.

Need help getting started?

Talk to the team at IBT about getting your NetSuite scripts ready for SuiteScript 2.1.

Talk to IBT