In a script deployment record, the Context Filtering tab lets us specify the contexts in which a script will run. We can use context filtering to ensure that a script runs only when necessary, which can improve performance.
We can specify the execution context and localization context for a script:
- Execution Context
- Localization Context

Execution Context
Execution contexts provide information about how or when a client script or user event 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. We can use execution context filtering to ensure that your scripts are triggered only when necessary. We can specify that a script should execute only in certain contexts, and this filtering can improve performance in contexts where the script is not required.
Localization Context
We can define the localization context in which a client or user event script can execute. We can enable the script execution for specific localization contexts programmatically and in the UI. Localization filtering allows us to execute a script based on the country of the active record or transaction. NetSuite automatically determines the localization context for records and transactions based on their values for country fields such as subsidiary and tax nexus. We can specify the execution order of localized client and user event scripts. A maximum of 10 localized/non-localized client scripts are supported. We can also search for localized scripts by using the N/query Module.