We at SuiteRep love using Visual Studio Code, as do many developers. What if there was a way to integrate NetSuite’s SuiteCloud Development Framework (SDF) with our favorite code editor and use SDF in VS Code?
Well, there actually is a way! Actually there is more than one way now. In this blog post, we’ll explain how to set up SuiteCloud CLI (Command Line Interface) on your computer.
Set Up NetSuite
For each NetSuite instance you want to work with, you’ll need to ensure that a couple of features are enabled before you can connect SDF in VS Code.
1. Enable the SuiteCloud Development Framework feature.
-
- Navigate to Setup > Company > Enable Features.
- Select the SuiteCloud tab, and in the SuiteCloud Development Framework section at the bottom, check the SuiteCloud Development Framework checkbox.
- Read and Accept the terms and conditions.
- Click Save.
2. Ensure the Token-Based Authentication feature is enabled.
-
- Navigate again to Setup > Company > Enable Features.
- Select the SuiteCloud tab and in the Manage Authentication Section section, check the Token-Based Authentication checkbox.
- Read and Accept the terms and conditions.
- Click Save.
Set Up Your Workstation
Setting up NetSuite’s SuiteCloud CLI in VS Code is a relatively simple process.
Install the SuiteCloud CLI
We are currently using the the SuiteCloud CLI for all our SuiteScript development. Once finished with installing and setting up this package with NPM, we can integrate with NetSuite from the terminal. And using the integrated terminal in VS Code makes the development process even more seamless and efficient.
The first step to set up the SuiteCloud CLI is to open your terminal. We like to use the terminal in VS Code, as it’s most convenient, but feel free to use your computer’s native terminal interface if you’d like (either Windows or Mac).
Assuming you have NPM installed on your system (learn more about NPM here), type npm install -g @oracle/suitecloud-cli
in your terminal. You’ll then see the terminal display some downloading information. You will also need to install the JDK for the SuiteCloud CLI to work, if you haven’t already. Click here to install a free open source version of JDK 11. Once everything is finished downloading, you should now be ready to start using SDF in VS Code. Sometimes errors do occur in the downloading process, however. Let us know in the comments if you encounter any issues here, and we may address the most common scenarios in a future blog post.
In an upcoming blog post, we’ll explain how to use the most important SuiteCloud CLI commands in your terminal.
Conclusion
Integrating NetSuite’s SDF in VS Code was one of the best things we’ve done for our development team. We hope this guide will encourage you to explore this possibility. Let us know if you have any questions in the comments below and we’ll see if we can help out in any way. And don’t forget to subscribe to our mailing list so you can receive more great SuiteScript content directly in your inbox each week!