Updating a Script Deployment
You can edit an existing script deployment using either the Deployments sublist on the script record or by editing the script deployment record.
For some script types, you can make changes by editing the script record’s Deployments sublist. However, for other types, the Deployments sublist is read-only. For these script types, you must edit the deployment using the script deployment record. You can do this programmatically using the N/record Module, or you can do this using the script deployment record entry form. This topic describes updating the deployment using the script deployment record entry form.
When you open the script deployment record for editing, you have access to more fields than are available on the Deployments sublist. For instance, the script record Deployments sublist lets you select the record the script deployment applies to, set a custom ID for the script deployment, select whether the script is to be deployed, set the status (Testing or Release), set the event type the deployment applies to, and set the log level for the deployment. On a script deployment record, you can set and select all of the same fields and additionally set the role the script is to be executed as for the deployment. You can also set and view additional script deployment details using the subtabs on the script deployment record:
-
Audience — When a script is deployed, it runs only in the accounts of the specified audience. This subtab lets you specify the roles that make up the script audience. In SuiteScript 2.0, this subtab is available for the following script types: client, portlet, RESTlet, Suitelet, and user event.
-
Scripts — For a client or user event script, you can view a summary of the scripts that are associated with the script deployment record.
-
Links — For a Suitelet, you can specify the menu paths that permit users to access the Suitelet.
-
Schedule — For a map/reduce or scheduled script, you can configure the schedule that determines when the script runs.
-
Context Filtering — You can set up context filtering to determine how and when a script runs. See Using the Context Filtering Tab.
-
Execution Log — You can use to log data when your script executes.
-
System Notes — You can view history details of the deployment on the System Notes subtab. The System Notes tab also lists the contexts that applied each time the script executed. For more information, see Execution Contexts.
You cannot edit a deployment if the script associated with the deployment is currently running in NetSuite. You must wait until the script stops running.
To update a script deployment:
-
Go to Customization > Scripting > Script Deployments.
-
Locate the deployment you want to edit, and click the corresponding Edit link.
-
Make changes on fields at the top of the Script Deployment page as well as in each subtab, as needed.
-
Click Save.