SuiteScript
NetSuite Unknown
2026-10-01

Account-Level Preferences Let You Test SuiteScript 2.0/2.x Server Scripts in the 2.1 Runtime

Two new General Preferences let admins run SuiteScript 2.0 and 2.x server scripts in the SuiteScript 2.1 runtime without changing @NApiVersion annotations, providing a low-risk path to validate compatibility ahead of the mandatory 2028.2 migration deadline.

Affects:SuiteScript 2.0SuiteScript 2.xSuiteScript 2.1Server ScriptsGeneral Preferences

What changed

Oracle added two account-level preferences under Setup > Company > Preferences > General Preferences that force SuiteScript 2.0 and 2.x server scripts to execute in the SuiteScript 2.1 runtime:

  • Execute SuiteScript 2.0 Server Scripts as 2.1
  • Execute SuiteScript 2.x Server Scripts as 2.1

This is a runtime-only switch. It does not change the upload-time syntax validation. Scripts annotated @NApiVersion 2.x or @NApiVersion 2.0 are still validated against SuiteScript 2.0 syntax rules when you upload them. If a script contains syntax only valid in 2.1 (for example, optional chaining or nullish coalescing), it will throw a syntax error on upload even with the preference enabled. To use 2.1-only syntax, you must explicitly change the annotation to @NApiVersion 2.1.

Scope limitations

  • Only server script types are affected. Client scripts, portlet scripts, and other client-side entry points are out of scope.
  • Only script types that SuiteScript 2.1 already supports will actually run in the 2.1 runtime. Unsupported types silently remain on 2.0.
  • Scripts with the Execute As field explicitly set to 2.0 on the Script Deployment record continue to run as 2.0 regardless of the account preference.

Deadline

Oracle states that all scripts using SuiteScript 1.0, 2.0, or the 2.x annotation must be migrated to SuiteScript 2.1 by the 2028.2 release. The exact enforcement mechanism (hard block vs. runtime warning) is not specified in the source.

Validation workflow

  1. Enable one or both preferences.
  2. Exercise your server scripts through normal business operations or automated test suites.
  3. Monitor the script execution logs for SuiteScript 2.1 compatibility errors.
  4. A script is considered validated when it completes with no errors and produces expected results.

What to do

  1. Inventory your server scripts. Identify every script annotated @NApiVersion 2.0 or @NApiVersion 2.x. Also check for any remaining SuiteScript 1.0 scripts, which require a separate rewrite.
  2. Enable the preferences in Sandbox first. Go to Setup > Company > Preferences > General Preferences and set both preferences to 2.1.
  3. Run your regression tests. Watch for runtime errors in the script execution log (under Customization > Scripting > Script Execution Logs). Pay attention to differences in how the 2.1 engine handles try/catch, typeof on undefined variables, and strict-mode edge cases.
  4. For scripts that pass: update the annotation from @NApiVersion 2.x to @NApiVersion 2.1 in the script file. This lets you use modern JavaScript syntax (ES2020+) at upload time as well.
  5. For scripts that fail: leave the preference enabled or revert it to 2.0 (the toggle is reversible at any time). Fix the compatibility issues, then re-test.
  6. Check deployment-level overrides. Any Script Deployment with the Execute As field set to 2.0 will bypass the account preference. Audit deployments to ensure nothing is pinned unintentionally.
  7. Plan for 2028.2. Oracle has not clarified whether scripts still on 2.0/2.x after 2028.2 will stop executing or simply log warnings. Until that is clarified, treat the deadline as a hard cutoff and budget migration time accordingly.

Note: The source release version for this feature is not stated in the documentation. The page reads as a general help article rather than a release-specific note. Confirm the exact release this preference became available by checking your Sandbox environment or contacting NetSuite support.