Version Information in the Script Record
Using the SuiteScript 2.1 value for the Execute SuiteScript 2.x Server Scripts As preference overrides the script version specified using the @NApiVersion JSDoc tag within the script. Because of this, it can be useful to verify the version of SuiteScript used to process the script. The script record includes two fields that provide information about SuiteScript version:
-
API Version - This field indicates the version of SuiteScript that is specified in the script file. It always shows a specific version of SuiteScript. For example, if you specify a version of 2.x in the script file, the value of this field is set to 2.0 (the value that the 2.x value maps to in this release by default). For more information about this field, see Script Record Creation.
-
Execute As Version - This field indicates the version of SuiteScript that is being used to process the script. This field is only shown on the script record if the Execute SuiteScript 2.x Server Scripts As preference is set to 2.1, and is the only indication that the script is executed as a SuiteScript 2.1 script based on the Execute SuiteScript 2.x Server Scripts As preference. The original SuiteScript version (as indicated in the API Version field) is displayed when the script is listed in NetSuite (for example, in script lists, script deployment lists, scripted records lists, and so on).