Running Scripts Using SuiteScript 2.1

The Execute SuiteScript 2.x Server Scripts As and Execute SuiteScript 2.0 Server Scripts as SuiteScript 2.1 account-level preferences let you specify which version of SuiteScript (SuiteScript 2.0 or SuiteScript 2.1) is used no matter what @NApiVersion JSDoc tag is set in the script file. With these preferences, you can:

For more information about this preference, see Enabling SuiteScript 2.1 at the Account Level.

Important:

Only script types supported on SuiteScript 2.1 will run when the Execute SuiteScript 2.0 Server Scripts as SuiteScript 2.1 preference is enabled. Scripts not yet supported in 2.1 will not be affected by this preference.

Currently, by default, a value of 2.x for the @NApiVersion JSDoc tag will resolve to 2.0 when the script is uploaded and executed. This means that all scripts that include @NApiVersion 2.x are executed as SuiteScript 2.0 scripts.

There are two ways you can run your scripts using SuiteScript 2.1:

For more information about the @NApiVersion JSDoc tag, see SuiteScript 2.x JSDoc Validation.

Related Topics

General Notices