Table of Contents

SuiteScript 2.1: Migration Guide

Share

Table of Contents

In part 3 of our four-part guideline on SuiteScript 2.1, we look at the migration strategy. In our final guide, we will advise you on how to get started.

Part 3: A Practical Migration Blueprint for NetSuite Admins

Migrating your custom code to SuiteScript 2.1 requires an approach that protects production data while keeping daily operations running smoothly.

Step 1: Categorize your inventory

Export every script record from your account and group them into three categories:

  1. Retire: Unused scripts, obsolete workflows, or duplicated logic. Deleting these immediately reduces your testing workload.
  2. Test directly: SuiteScript 2.0 and 2.x scripts. Many 2.0 scripts run under the 2.1 runtime without code edits. Testing them early identifies easy quick wins.
  3. Convert: All SuiteScript 1.0 scripts and any 2.0 scripts that fail testing under the 2.1 runtime. These require full code rewrites.

Step 2: Use account-level preferences in Sandbox

NetSuite provides two company-wide settings under Setup > Company > Preferences > General Preferences:

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

Enable these preferences in a freshly refreshed sandbox account first. This lets you run regression tests across your business processes without changing a line of source code, exposing runtime errors instantly.

Step 3: Rewrite and validate high-risk code

When converting 1.0 code to 2.1, pay close attention to these common pitfalls:

  • Removed functions: Functions like nlapiYieldScript or custom recovery points no longer exist; replace them with Map/Reduce scripts.
  • Sublist line indexing: Adjust line loops from 1-based to 0-based indexing to prevent off-by-one errors.
  • RESTlet changes: Responses from external API calls can behave differently under Graal. Compare JSON responses field-by-field.

Step 4: Stagger your releases

Never deploy your converted scripts all at once. Package your code using the SuiteCloud Development Framework (SDF) and back up prior versions in Git. Deploy converted scripts in small groups based on business function, monitor execution logs for a week, and then proceed to the next group.

Partner with NetSuite Regional Experts

PS Global Consulting is an Oracle NetSuite implementation partner headquartered in Singapore, with 18 years of experience across Singapore, Malaysia, Indonesia, Thailand, Vietnam, Hong Kong, the Philippines, China, Korea, Japan, and Taiwan.

As a multi-year NetSuite ASEAN Partner of the Year, we specialize in localizing NetSuite, managing complex migrations, and ensuring custom code remains maintainable and compliant.

Do not wait for the 2028 deadline to force a rushed conversion. Contact us to schedule an initial account review.

Share