There is some setup required if you want to cling to your Microsoft roots and stick with a Microsoft Editor when writing NetSuite code in the cloud.
I’ve been using Visual Studio for a long (long) time! I like it. Several years ago when I attended the Visual Studio Live conference in Redmond, I asked one of the VS developers how big their team was. I’ll remind you, this was several years ago. She said it was right at 110 teammates.
I haven’t been back to Redmond in a few years. Instead, I’ve been attending SuiteWorld. So I can’t say how big the VSCode team is. But the product is good and getting better fast. I get updates several times per month.
So… If you come from a Microsoft background, like me, or you are ready to try an alternative to Eclipse, here’s how you can use VSCode seamlessly in the NetSuite developer realm.
- Install VSCode – https://code.visualstudio.com/download
- Install NetSuite-Sync : npm install – g netsuite-sync
- Create a config file: ns -g
- This prompts you for user ID & password
- Then it prompts for a NetSuite folder ID
- Then it creates a NetsuiteConfig.js file with all your info unencrypted
- Next install “Git for Windows” – https://git-for-windows.github.io
- Open the Git Bash command prompt
- CD to the folder where you created your NetsuiteConfig.js file.
- Type: export NSPW=”some encryption seed”
- Then encrypt your NetsuiteConfig.js file by typing: ns -e
- Then delete your NetsuiteConfig.js file, since you’ll be using the encrypted version.
- In VSCode [ctrl] + ` or … View >> Terminal
- In the terminal window, type:
- The file you just named will be uploaded to the folder you specified in your original NetsuiteConfig.js file.
Here is a shortcut that I found very useful. You’ll want it too.
- Let’s set VSCode to auto-save. File >> Preferences >> Settings
- Type in “auto save” to find the following:
- These are my auto-save settings. Feel free to make yours look like mine.
- In VSCode’s editor window, hit F1 to open the command center.
- Type: shortcuts
- select the highlighted option (in yellow)
- Add the following key binding:
- Once you make this change, you can simply hit [ctrl] + [alt] + u to upload the current file to NetSuite.
I’ve found this works really well. I’m certainly open to suggestions if you’ve got any. Please leave me a comment if you can improve on this, or if you hate it and Eclipse is way better. For us Microsoft devs… this is quite familiar. Lovin’ it!