Using SuiteScript Code Completion in SuiteCloud IDE Plug-in for WebStorm
Code completion works by examining the source code around the cursor in the editor. Depending on where the caret is positioned, a popup displays with SuiteScript (and also JavaScript) text options to insert at the cursor.
When you create a new SuiteCloud project, both 1.0 and 2.x versions of SuiteScript APIs are added as external libraries to the SuiteCloud project. The IDE plug-in can read the SuiteScript 1.0 and 2.x External Libraries to help check SuiteScript syntax and assist with entering functions, methods, SDF custom objects, and references.
For SuiteScript 1.0, code completion works natively. For SuiteScript 2.x, when you create a SuiteScript file and add SuiteScript modules, code completion is available for those modules through JSDoc annotation tags. If you do not add any SuiteScript module upon the file creation, code completion is not available automatically. Similarly, if you add more SuiteScript modules after the file has been created, code completion is not available.
Code completion of parameters, such as record types, is not supported.

If you want to have code completion for modules you add after creating a SuiteScript file, you need to add JSDoc annotation tags manually. Then, you need to add the module names in the SuiteScript file.
To enable code completion for SuiteScript 2.x:
-
In the define function of your SuiteScript file, add a dependency such as
['N/config']
.Note:To ensure you use the right name of the modules, see SuiteScript 2.x Modules.
-
In the define function, add the module name as a JSDoc annotation tag. Use the same module name as in the previous step, but without the N/ prefix.
-
In the function argument, add the module name without the N/ prefix.
For more information, see the following topics:
-
If you do not want to use code completion, see Turning Off Code Completion in SuiteCloud IDE Plug-in for WebStorm.
Related Topics
- SuiteCloud IDE Plug-in for WebStorm Usage
- Working with SuiteCloud Projects in SuiteCloud IDE Plug-in for WebStorm
- Working with SDF Custom Objects in SuiteCloud IDE Plug-in for WebStorm
- Working with SuiteScript Files in SuiteCloud IDE Plug-in for WebStorm
- Adding Dependencies to the Manifest in SuiteCloud IDE Plug-in for WebStorm
- Changing Project Settings in SuiteCloud IDE Plug-in for WebStorm
- Setting Installation Preferences in SuiteCloud IDE Plug-in for WebStorm
- Managing SuiteCloud Projects as Compressed Files in SuiteCloud IDE Plug-in for WebStorm
- Validating a SuiteCloud Project with SuiteCloud IDE Plug-in for WebStorm
- Deploying a SuiteCloud Project to Your NetSuite Account with SuiteCloud IDE Plug-in for WebStorm
- Shortcut Keys in SuiteCloud IDE Plug-in for WebStorm