Localization Context-Aware Scripts

Administrators and other users with access to scripts can set up a localization context association rule for SuiteScript 2.x user event or client scripts. You can set a localization context association rule on the script deployment record by selecting the country or countries for which a script is relevant. Script deployments with a localization context association rule result in context–aware scripts.

Localization context–aware scripts only run on records associated with a defined country or countries. The execution of context–aware scripts is filtered by comparing the localization context of records to the country values selected on the script deployment record. This filtering is useful for users with subsidiaries in multiple countries, because it causes the script deployment to 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 script deployment, the localization contexts of records are verified against the countries selected on the script deployment record before these scripts load and run. The context–aware scripts skip other records. Script maintenance is easier, because you can be sure that scripts only run on relevant records.

Note:

Any and all scripts created before NetSuite 2020.1 are not localization context–aware to guarantee backward compatibility.

Example: The record localization context is determined as “France” and the context association rule is employed — the scripts deploy in the following way:

Related Topics:

General Notices