How To import the Deployment of a USER EVENT SCRIPT

Step 1: Authenticate with NetSuite

  1. Open VS Code.
  2. Open the Command Palette (Ctrl + Shift + P).
  3. Search for “SuiteCloud: Set Up Account” and select it.
  4. Authenticate your NetSuite account (if not already set up).

Step 2: Import the User Event Script File

  1. Open Command Palette (Ctrl + Shift + P).
  2. Search for “SuiteCloud: Import files from Account” and select it.
  3. Choose “File Cabinet”.
  4. Navigate to SuiteScripts and find your User Event Script file (e.g., SuiteScripts/my_script.js).
  5. Select the script and import it.

Step 3: Import the Script Deployment Record

  1. Open Command Palette (Ctrl + Shift + P).
  2. Search for “SuiteCloud: Import Objects from Account” and select it.
  3. This time, choose “Script”
  4. Locate your User Event Script Deployment (e.g., custdeploy_my_script).
  5. Click Import.
  6. The deployment details will now be available in your SDF project under Objects.

Step 4: Validate the Imported Deployment

  1. Open Command Palette (Ctrl + Shift + P).
  2. Search for “SuiteCloud: Validate Project” and run it.
  3. If errors appear, resolve them before proceeding.

Step 5: Deploy the User Event Script and Deployment

  1. Open Command Palette (Ctrl + Shift + P).
  2. Search for “SuiteCloud: Deploy Project” and select it.
  3. Choose “Deploy Project “ first to preview changes.
  4. If everything looks good, run “SuiteCloud: Deploy Project” to deploy the script and its deployment.

Step 6: Verify in NetSuite

  1. Log in to NetSuite.
  2. Navigate to Customization > Scripting > Script Deployments.
  3. Find your User Event Script Deployment and ensure it’s active and associated with the correct record type.

Leave a comment

Your email address will not be published. Required fields are marked *