Localization Context-Aware Scripts
Administrators and users with script access can set up a localization context association rule for SuiteScript 2.x user event or client scripts. You can set this rule on the script deployment record by picking the countries where the script applies. Script deployments with this rule create context-aware scripts.
Context-aware scripts only run on records linked to specific countries. NetSuite filters context-aware scripts by comparing a record's localization context to the countries you picked on the script deployment. This filtering helps user with subsidiaries in different countries because it makes script deployment run faster.
For more information about setting up a localization context association rule that filters script execution based on records’ associated countries, see Localization Context Filtering for SuiteScript 2.x.
During deployment, NetSuite checks each record's localization context against the countries you picked before loading and running the scripts. The context–aware scripts skip other records. Script maintenance is easier because you know scripts only run on relevant records.
For example, if the record's localization context is "France" and you use a context association rule, scripts deploy like this:
-
Context-aware scripts only deploy on records with the localization context "France."
-
Any other scripts deploy on all records.