Script Deployment
Before an entry point script will run in your NetSuite account, it must be deployed. You can deploy a script when you create a script record, or you can deploy it later. The deployment settings available vary depending on the script type and on how you deploy the script.
When you deploy a script, NetSuite creates a script deployment record. Script deployment records are listed at Customization > Scripting > Script Deployments. Deployments are also listed on the Deployments subtab of the script record.
Multiple deployments can be created for the same script record. When multiple deployments exist, they are executed in the order in which they are listed on the Deployments subtab. This sequence typically corresponds with the order in which the deployments were created.
To create and edit a script deployment record, you must use a role with Edit level SuiteScript permissions. Make sure you have set the correct permissions and features. For more information, see Setting Roles and Permissions for SuiteScript.
On a script deployment record, you can set up context filtering to determine how and when the script runs. You set up context filtering on the Context Filtering tab when you create or edit a script deployment record. There are two types of context filtering:
-
Execution context filtering — Execution contexts provide information about how a script is triggered to execute. For example, a script can be triggered in response to an action in the NetSuite application, or an action occurring in another context, such as a web services integration. For more information, see Execution Contexts.
-
Localization context filtering — Localization contexts provide information about the countries or regions in which a script can execute. For example, you can specify that a script should run only on records that are associated with Canada. NetSuite automatically determines the localization context for records and transactions based on their values for country fields such as subsidiary and tax nexus. For more information, see Record Localization Context.
For more information about setting up context filtering, see Using the Context Filtering Tab.
For more information, see the following help topics: