# SuiteScript 1.0 to 2.1 Migration Checklist

> Source: https://netray.co/tools/netsuite-suitescript-1-0-to-2-1-migration-checklist
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

A five-stage checklist for moving NetSuite scripts from SuiteScript 1.0 to 2.1: inventory, design, code changes, deployment cutover and testing.

## Category

developer

## Erp

NetSuite

## Audience

- SuiteScript developer
- NetSuite technical lead
- NetSuite administrator

## Tool

**Kind:** checklist

**Groups:**

#### Inventory

**Items:**

**Text:** List 1.0 scripts at Customization > Scripting > Scripts, filtered or sorted by API version

**Critical:** true

List every deployment of each script, with record type, status, audience and execution context

List 1.0 library files referenced by each script, as they cannot be loaded as 2.x modules

List workflows that call 1.0 workflow action scripts

Separate scripts you own from scripts installed by bundles or SuiteApps, which their publisher must migrate

Flag scripts nobody uses (no recent execution log) for retirement instead of migration

#### Design

**Items:**

Map each nlapi and nlobj call to its N/ module equivalent using Oracle's SuiteScript 1.0 to 2.x API map

Replace nlapiYieldScript and nlapiSetRecoveryPoint patterns with a Map/Reduce script, as 2.x has no yield

Replace nlobjSearchResultSet getResults loops with search.runPaged or ResultSet.each

Choose @NApiVersion 2.1 for new server scripts to use modern JavaScript syntax; confirm support for client scripts in your release

Use the AMD define structure with only the N/ modules each entry point needs

Decide which scripts to merge or split, since 2.x entry points differ by script type

#### Code changes

**Items:**

**Text:** Handle typed values: getValue returns Date objects for date fields and true/false for checkboxes, not strings or 'T'/'F'

**Critical:** true

Use getText where the 1.0 code relied on display text

Use lowercase field and sublist IDs (for example 'item'), since 2.x IDs are case sensitive

Raise errors with error.create from N/error and catch them by name

Replace nlapiLogExecution with log.debug, log.audit, log.error and log.emergency

Recheck governance usage per call against the 2.x governance tables and log runtime.getCurrentScript().getRemainingUsage()

Pass script parameters by their custscript_ IDs with runtime.getCurrentScript().getParameter

#### Deploy

**Items:**

**Text:** Create a new script record for each 2.x file; do not plan on switching the 1.0 script record to the new file

**Critical:** true

Recreate script parameters with the same custscript_ IDs where possible, or update references

Copy deployment settings: record type, status, event type, audience, execution context, log level

Check the script execution order on the record so the 2.x script runs where the 1.0 one did

**Text:** Set the 1.0 deployment to not deployed or inactive in the same change window as the 2.x one goes live

**Critical:** true

Deploy through SDF projects so sandbox and production match

#### Test

**Items:**

Run old and new scripts in parallel in a sandbox on copies of the same records and compare results

**Text:** Test every execution context the 1.0 deployment covered: user interface, CSV import, web services, scheduled, other scripts

**Critical:** true

Log governance usage on the largest real records and volumes

Test error paths and confirm alerts reach the right people

Keep a rollback plan: the 1.0 deployment can be reactivated if the 2.x one is set back to not deployed

**Scoring Note:** The critical items prevent the two worst outcomes: a script running twice (old and new deployments both live) or not at all in a context nobody tested.

## Content

**Intro:** This checklist plans a migration of NetSuite scripts from SuiteScript 1.0 to 2.1, from inventory through cutover. It focuses on the places migrations break: typed values, script records, deployment overlap and untested execution contexts.

**Sections:**

#### How to use it

**Body:** Run the inventory group once for the whole account and export it to Excel as the migration backlog. Then work the design, code, deploy and test groups per script or per batch of related scripts. Mark critical items done only with evidence: a parallel run result, the deployment status change, the list of contexts tested. Oracle still runs 1.0 scripts, so there is no need to migrate everything at once; start with scripts you are already changing, scripts that use yield logic, and scripts on high-volume records where 2.x paging and Map/Reduce help.

#### Where this lives in NetSuite

**Body:** Scripts are under Customization > Scripting > Scripts and deployments under Script Deployments. A 2.x file declares its version and type in JSDoc tags at the top, such as @NApiVersion 2.1 and @NScriptType UserEventScript, and returns its entry points from a define callback. Oracle's help includes a SuiteScript 1.0 to 2.x API map that lists the 2.x equivalent of each nlapi function and nlobj object, and the SuiteScript 2.x governance tables list usage units per method. Script execution order on a record type is managed from the record's scripted records page, which matters when you swap a 1.0 script for a 2.x one.

#### Worked example

**Body:** A 1.0 scheduled script reprices open sales orders, calls nlapiYieldScript when governance runs low and reads a checkbox with == 'T'. In design it becomes a Map/Reduce script: getInputData returns a search of open orders, map loads and updates each order, summarize logs errors. In code the checkbox test becomes === true and the order date, now a Date object, is formatted with N/format for logging. A new script record is created with the same custscript_ parameter IDs. In the change window the 1.0 deployment is set to not scheduled and the Map/Reduce deployment is scheduled. Sandbox parallel runs on the same 500 orders produced identical prices before go-live.

#### Version differences and gotchas

**Body:** 2.0 and 2.1 share the same modules; 2.1 runs on a newer engine with modern JavaScript syntax such as let, const and arrow functions, so write new code as 2.1 unless a script type or a dependency in your release requires 2.0. A 2.x script cannot load a 1.0 library, so shared 1.0 libraries must be rewritten as AMD modules before the scripts that use them. Field and sublist IDs are case sensitive in 2.x. Dates and checkboxes come back typed. Search results are capped per getRange call, so use runPaged for large sets.

**Cta:** If you want an on-prem AI assistant that reads your 1.0 scripts, drafts the 2.1 version and lists the contexts to test, with your developers approving every change, we can set that up.

**Faq:**

#### Is SuiteScript 1.0 still supported?

**Answer:** SuiteScript 1.0 scripts continue to run, but Oracle builds new capabilities in SuiteScript 2.x and recommends 2.x for new development. Check the current release notes for any change in 1.0 status. Migrating when you next change a script avoids a large forced project later.

#### Should I migrate to SuiteScript 2.0 or 2.1?

**Answer:** Prefer 2.1. It uses the same N/ modules as 2.0 and adds modern JavaScript syntax, which makes code shorter and easier to review. Use 2.0 only where a script type or dependency in your release requires it, and confirm client script support in the help for your version.

#### Can I change an existing script record from 1.0 to 2.1?

**Answer:** Plan on creating a new script record for the 2.x file. The safe pattern is a new script record and deployment, recreated parameters, and the old 1.0 deployment set to not deployed or inactive in the same change window, which also keeps an easy rollback.

#### What SuiteScript questions come up in developer interviews?

**Answer:** Common ones: the script types and their entry points, governance limits and how Map/Reduce avoids them, the difference between getValue and getText, how runPaged works, how user event context types affect logic, and how you would migrate a 1.0 script. This checklist covers most of the migration answers.

## Search terms

netsuite transitioning to suitescript 2.1, netsuite suitescript 1.0, suitescript 1.0 to 2.0 migration, suitescript 2.1 migration checklist, netsuite suitescript api documentation, netsuite suitescript interview questions, nlapi to suitescript 2.x

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
