In a recent blog post, we were excited to introduce NetSuite’s new extension for Visual Studio Code. Today, we want to explain how to use this helpful new tool!
Recap
The new SuiteCloud extension enables developers to download and upload files to and from NetSuite using Visual Studio Code. Such a tool is an invaluable timesaver for the SuiteScript developer. Read more about the new extension here.
Special Notes
As mentioned briefly in our previous article, this new extension provides full use of the already-existing CLI (command line interface) as well as a completely new user interface within VS Code. It’s up to you which variation you would like to use. There are some pros and cons to each that should be noted, however.
User Interface
Pros
- Easy, pretty, and intuitive to use
Cons
- Must open project in separate window
- Not able to search across all projects while in separate window
Command Line Interface (CLI)
Pros
- Really fast if you know what you’re doing
- Able to search across all projects
- Able to switch to other projects quickly
Cons
- Unappealing interface
With these considerations, our own development team will continue to use the CLI because of its speed and efficiency in development. But there may be some aspects of the extension (such as creating a SuiteScript file) that will come in handy. So whether you plan to use the CLI or the new user interface, we invite you to explore the full breadth of this new resource with us.
The Most Important Functions
Unlike the traditional command line interface (CLI), the new extension’s home is in the Visual Studio Code “Command Palette.” To access the Command Palette, navigate to View > Command in your VS Code application menu or use the associated shortcut (Cmd+Shift+P for Mac, Ctrl+Shift+P for Windows).
Once you have opened the Command Palette, you can filter your commands by typing “SuiteCloud.”
Create Project
If you already have an existing SDF project you would like to open with Visual Studio Code, you can open that folder by navigating to File > Open (Cmd+O for Mac, Ctrl+O for Windows).
Otherwise, you can create a new project by opening the Command Palette and selecting the “SuiteCloud: Create Project” option. This will beckon you to select a location and name for the project.
Once all the details have been configured, you should see a popup in the bottom right corner of your screen to open the project in a new window. As of writing this article, you will need the project to be in its own window for the extension to work properly.
Set Up Account
When following the prompt to open the project window, you may see another popup to set up the account for the project. But if you don’t see that, don’t worry! You can easily set up the associated account using the “SuiteScript: Set up Account” option in the Command Palette. Follow the prompts to connect to your NetSuite instance. We recommend using the browser-based authentication option, as this is the simplest. If you are having difficulties connecting to your NetSuite account, make sure you have the “SuiteCloud Development Framework” feature enabled.
Create SuiteScript File
With the new extension, we are now able to create a SuiteScript file template. This is a new feature that the traditional CLI does not include.
Select the “SuiteCloud: Create SuiteScript File” option.
You will then be able to select what kind of SuiteScript file you would like to create.
What’s great is that we can also select what modules we would like to include!
Conclusion
There is a lot to this new extension! We still need to talk about the options for downloading and uploading files. Please subscribe to our email list and stay tuned for our upcoming blog post about that topic!