Configuring a script in NetSuite to subscribe to Case object change
NetSuite connections in Application Integration perform CRUD operations, such as create, read, update, delete on NetSuite tables. When you create or update a Case entity, a web request is initiated in NetSuite. To synchronize NetSuite cases with Salesforce cases, you need to create a script in NetSuite.
To configure a script in NetSuite, perform the following steps:
Step 1: Create a script in NetSuite.
Step 2: Upload the script and create a script record.
Step 3: Deploy the script and apply it to a Case entity.
Creating a script
To create a script, perform the following steps:
1 Log in to the NetSuite organization.
2Go to Customization > Scripting > Scripts, and then click New.
3In the Upload Script File section, click the + icon to add a script file. Enter the file name and select the script file as shown in the following image:
Note: Use the .js extension for the script file name.
For more information about the script format, see Sample script.
4Click Save.
5After adding the script file in the Upload Script File section, click Create Script Record.
6In the Script section, enter the NetSuite event name and ID as shown in the following image:
7Click Save.
8In the Script section, click Deploy Script.
9You can now apply the script to any Case entity. Enter the deployment script ID and select the Status.
10Click Save.
The scrip is successfully deployed.
Important: The deployed script can be used for any entity in NetSuite, not just the Case entity.
You can create and add multiple scripts and reuse them.
Sample script
You can create a script in NetSuite to automate business processes.
The following snippet is a sample script for NetSuite: