Using SuiteScript Code Completion in SuiteCloud IDE Plug-in for WebStorm
Code completion works by checking the source code around the cursor in the editor. Depending on where the caret is, a popup shows SuiteScript (and JavaScript) text options you can 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 your project. The IDE plug-in reads 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 don't add any SuiteScript modules when you create the file, code completion isn't available automatically. And if you add more SuiteScript modules after the file's been created, code completion won't work for those either.
Code completion of parameters, like record types, isn't supported.

If you want code completion for modules you add after creating a SuiteScript file, you need to add JSDoc annotation tags manually and include the module names in the 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 before, but without theN/
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