Errors with SuiteScript 2.1 Scripts
The following table summarizes when errors can occur with SuiteScript 2.1 scripts:
|
Scenario |
Outcome |
|---|---|
|
A syntax error occurs when you save the script. You can't save a script where you have added SuiteScript 2.1 syntax even if the Execute SuiteScript 2.x Server Scripts As preference is set to 2.1. To resolve this issue, change the @NApiVersion value to 2.1 to explicitly run the script as a SuiteScript 2.1 script. |
|
The script no longer works. When the account-level preference is set to SuiteScript 2.0, all 2.x scripts run as SuiteScript 2.0 scripts. SuiteScript 2.1 syntax is not valid in a SuiteScript 2.0 script. To resolve this issue, do one of the following:
|