Basics
SuiteScript Installation
Setting Up SuiteScript
SuiteScript setup uses NetSuite’s SuiteCloud IDE or VS Code with no separate installation.
Understanding SuiteScript Setup
SuiteScript is a JavaScript-based API that enables developers to customize and automate processes in NetSuite. It is an integral part of the SuiteCloud platform, allowing for highly tailored solutions. Setting up SuiteScript does not require a separate installation as it is integrated with NetSuite’s SuiteCloud Integrated Development Environment (IDE) and can also be used with Visual Studio Code (VS Code).
Using SuiteCloud IDE
SuiteCloud IDE is a specialized development environment designed specifically for NetSuite applications. It provides tools for script debugging, code completion, and project management. Here’s how you can set it up:
- Access: Log in to your NetSuite account and navigate to the SuiteCloud IDE section.
- Project Creation: Start a new project directly within the IDE, which will allow you to manage your SuiteScript files efficiently.
- Debugging and Testing: Use built-in tools to debug and test your scripts in a sandbox environment before deploying them.
Setting Up SuiteScript in VS Code
Visual Studio Code is a versatile code editor that can be used for SuiteScript development with the help of the SuiteCloud Extension for VS Code. Here are the steps to get started:
- Download and install Visual Studio Code if it is not already installed.
- Install the SuiteCloud Extension for VS Code from the VS Code Marketplace.
- Create a new project by selecting 'SuiteCloud: Create Project' from the command palette.
- Use the extension features to manage your SuiteScript files and deploy them to your NetSuite account.
Example: Creating a Simple SuiteScript
Let's create a basic SuiteScript file to understand the development process. Below is an example of a simple SuiteScript 2.0 file:
This script logs the Entity ID of a record before it is submitted. It uses the SuiteScript 2.0 syntax, which is module-based and provides better performance and scalability. You can deploy this script to your account using either SuiteCloud IDE or VS Code with the SuiteCloud extension.
Basics
- Previous
- Logging
- Next
- Running Code