Coming from a Microsoft background, I chose VSCode instead of Eclipse as my IDE for SuiteScript development. I have another article on using VSCode + NetSuite-Sync to publish SuiteScript to the cloud. In that article, I failed to mention how to make VSCode aware of the SuiteScript API methods.
First, I’ll point out that when I started NetSuite-Sync was my only option for direct publishing of SuiteScript to the cloud. However, a second option exists today, NetSuite Upload. As of this post, there were only 735 installs of NetSuite Upload, but the limited number of reviews looked very positive.
Personally, I’m happy with NetSuite-Sync. It was quirky to install (see my other post for instructions) but it works great.
What I failed to mention in my previous post was how to make VSCode aware of the SuiteScript APIs. If you don’t do this step, you are forced to refer to the developer guides every time you write an API call.
Here are the 2 things to remember when hooking up VSCode and NetSuite APIs:
- Download the API definitions
- Add a jsconfig.json file to your workspace
First, the API definitions.
Documents >> Files >> SuiteScripts
Notice the links in the upper right of the screen.
Pick your flavor of choice and then save that .js file to your VSCode workspace.
Second, create a jsconfig.js file in the same root directory of your VSCode workspace. Mine is super simple.
That’s it! Now when you start typing an API method call, VSCode will help with auto-complete. And when you select a method, VSCode is aware of the parameters and can present some documentation on the fly.
Here is a SuiteAnswers Article that discusses non-Eclipse IDEs.