SuiteScript Reserved Words

In the ECMAScript specification, reserved words are identifiers that have special meaning. For example, the var reserved word indicates a variable declaration, and the try reserved word indicates the start of a try-catch block. You cannot use reserved words as variable names, labels, or function names in languages based on the ECMAScript specification, such as JavaScript. For more information about the ECMAScript specification, see JavaScript language resources.

SuiteScript is based on the ECMAScript specification, and you cannot use ECMAScript reserved words as variable names or function names in your SuiteScript scripts. This restriction applies to both SuiteScript 2.0 and SuiteScript 2.1. If you use a reserved word as a variable name or function name, your script may produce a syntax error when it runs.

To view the list of reserved words, visit the following link:

JavaScript Reserved Words

You should not use any of the reserved words that are included in ECMAScript 2015. For best compatibility, you should also avoid using any reserved words that may be supported in future editions of ECMAScript.

Note:

SuiteScript 2.x provides global objects including log Object and util Object. If you are using the words ‘log’ or ‘util’ as variable names in your SuiteScript 1.0 scripts and you have both SuiteScript 1.0 and SuiteScript 2.0 scripts running on the same record you will receive an error. Both the ‘log’ and ‘util’ words are reserved in SuiteScript 2.x. You will need to update your SuiteScript 1.0 scripts that use ‘log’ or ‘util’ as variables names.

Related Topics

General Notices