SuiteScript Version Compatibility Rules

You can't 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 call RESTlets and Suitelets written in SuiteScript 2.1 from SuiteScript 1.0 scripts. SuiteScript 2.1 scripts can also call RESTlets and Suitelets written in SuiteScript 1.0 code. To call a RESTlet from a SuiteScript 1.0 script, use nlapiRequestRestlet(scriptId, deploymentId, urlParams, body, headers, httpMethod). To call a Suitelet from a SuiteScript 1.0 script, use nlapiRequestURL(url, postdata, headers, callback, httpMethod). For more information, see Using SuiteScript 2.x Scripts with SuiteScript 1.0 Scripts.

When SuiteScript 2.1 custom modules are used with SuiteScript 2.0 entry point scripts, compatibility issues may occur if the custom modules contain language features or syntax that are not supported in SuiteScript 2.0. 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.1 Map/Reduce Script Type for more information.

Related Topics

General Notices