Step 1: Authenticate with NetSuite
- Open VS Code.
- Open the Command Palette (
Ctrl + Shift + P). - Search for “SuiteCloud: Set Up Account” and select it.
- Authenticate your NetSuite account (if not already set up).
Step 2: Import the User Event Script File
- Open Command Palette (
Ctrl + Shift + P). - Search for “SuiteCloud: Import files from Account” and select it.
- Choose “File Cabinet”.
- Navigate to SuiteScripts and find your User Event Script file (e.g.,
SuiteScripts/my_script.js). - Select the script and import it.
Step 3: Import the Script Deployment Record
- Open Command Palette (
Ctrl + Shift + P). - Search for “SuiteCloud: Import Objects from Account” and select it.
- This time, choose “Script”
- Locate your User Event Script Deployment (e.g.,
custdeploy_my_script). - Click Import.
- The deployment details will now be available in your SDF project under Objects.
Step 4: Validate the Imported Deployment
- Open Command Palette (
Ctrl + Shift + P). - Search for “SuiteCloud: Validate Project” and run it.
- If errors appear, resolve them before proceeding.
Step 5: Deploy the User Event Script and Deployment
- Open Command Palette (
Ctrl + Shift + P). - Search for “SuiteCloud: Deploy Project” and select it.
- Choose “Deploy Project “ first to preview changes.
- If everything looks good, run “SuiteCloud: Deploy Project” to deploy the script and its deployment.
Step 6: Verify in NetSuite
- Log in to NetSuite.
- Navigate to Customization > Scripting > Script Deployments.
- Find your User Event Script Deployment and ensure it’s active and associated with the correct record type.