SuiteScript Versioning Guidelines

See the following sections for information about SuiteScript versioning:

Important:

If you are using SuiteScript 1.0 for your scripts, consider converting these scripts to SuiteScript 2.0 or 2.1. Use SuiteScript 2.0 and 2.1 to take advantage of new features, APIs, and functionality enhancements. For more information, see SuiteScript 2.x Advantages and SuiteScript 2.1.

SuiteScript 2.1

A new version of SuiteScript is now available. This new version, SuiteScript 2.1, includes the existing features and functionality that SuiteScript 2.0 offers, and it also supports new language capabilities that were introduced in the ECMAScript 2019 (ES2019) edition of the ECMAScript specification. SuiteScript 2.1 supports all server script types, such as user event scripts, scheduled scripts, and Suitelets, and it is backward compatible with SuiteScript 2.0.

This latest version of SuiteScript is separate from previous SuiteScript versions (1.0 and 2.0), and you can create and run SuiteScript 2.1 scripts alongside SuiteScript 1.0 and 2.0 scripts in your account. Your existing scripts are not affected.

To learn more about SuiteScript 2.1, see SuiteScript 2.1.

SuiteScript Versioning

SuiteScript 2.0 and all future releases of SuiteScript will maintain the following versioning system.

Version Type

Numbering Pattern

Description

Major

Version 2.0, 3.0, 4.0

Major versions of SuiteScript include significant functionality changes and improvements.

Major versions are not backward compatible with previously released versions.

Minor

Version 2.0, 2.1, 2.2

Minor versions of SuiteScript include enhancements to existing features.

Minor versions are backward compatible with all versions released since the last major version. For example, SuiteScript 2.1 is backward compatible with SuiteScript 2.0, but it is not backward compatible with SuiteScript 1.0.

Patch

Does not apply

Patch versions of SuiteScript are included with regular NetSuite bug fix releases.

Patch versions are backward compatible with all versions released since the last major version.

You can also specify a SuiteScript version of 2.x in your scripts. The 2.x value usually represents the latest version of SuiteScript that is generally available and does not represent any versions that are released as beta features. However, this does not apply to SuiteScript 2.1. In this release, the 2.x value indicates that a script uses SuiteScript 2.0, not SuiteScript 2.1. You can still use SuiteScript 2.1 and all of its features in your server scripts, but your 2.x scripts will not run as SuiteScript 2.1 scripts until a future release. For more information about specifying a version for your script, see SuiteScript 2.x JSDoc Validation and SuiteScript Versions.

You can use an account-level preference, Execute SuiteScript 2.x Server Scripts As, to specify that the 2.x value should represent SuiteScript 2.1 instead of SuiteScript 2.0. Setting this preference to 2.1 applies to all scripts in your account that use the 2.x value. For more information about this preference and how to use it, see Enabling SuiteScript 2.1 at the Account Level.

Version Cohabitation Rules

You cannot use APIs from different major versions of SuiteScript in one script. For example, you cannot use SuiteScript 1.0 APIs and SuiteScript 2.0 APIs in the same script. However, you can have multiple scripts in your account that use different SuiteScript versions. These scripts can be deployed in the same account, in the same SuiteApp, and on the same record.

You can use nlapiRequestRestlet(scriptId, deploymentId, urlParams, body, headers, httpMethod) in SuiteScript 1.0 scripts to call RESTlets written in SuiteScript 2.x code. For more information, see Using SuiteScript 2.x Scripts with SuiteScript 1.0 Scripts.

You cannot use SuiteScript 2.1 custom modules with SuiteScript 2.0 entry point scripts. For more information about custom modules, see SuiteScript 2.x Custom Modules.

The Map/Reduce script type is a new functionality introduced with SuiteScript 2.0. You cannot use nlapiScheduleScript(scriptId, deployId, params) to schedule a Map/Reduce script. See SuiteScript 2.x Map/Reduce Script Type for more information.

Related Topics

General Notices