Optimizing Configuration, Deployment, and Scope

Warning:

Deploy scripts only to the specific record types that require the log. When you deploy a script to a broad category, such as item or transaction, NetSuite automatically attaches that script to every related sub-type. Your script will then run on records that do not need this script, possibly increasing page-load times and consuming extra processing power.

Manage Script Deployment Log Levels

Do not leave debug logging enabled for scripts you push to production. Instead, ensure you set each script deployment's log level to audit, error, or emergency before you move it to production.

Leaving the level at debug, especially when log.debug() calls remain inside your script, adds unnecessary overhead and inflates the script log. Ensure you log only what you need for normal operations and replace granular entries with a single summary log.

Although log.debug() is an asynchronous call, it still generates network traffic in your client scripts, adding avoidable competition for browser-limited resources.

Limit Audience and Contexts

When you deploy scripts, it is important to define the required execution contexts, event types, and audience. Limiting your script execution to only the necessary employees, roles, and contexts may help improve your performance and reduce unnecessary processing.

  • Use the N/runtime module to restrict script execution to specific roles or contexts where appropriate.

  • Configure script deployments in the NetSuite application to ensure scripts run only for the intended audiences and event types.

Migrate from Legacy Tax to SuiteTax

SuiteTax's modern process completes tax calculations faster than the Legacy Tax module. Migrate from Legacy Tax to SuiteTax where possible and you may see shorter transaction-save times and improved overall performance.

Limit Localization Record Context

When your SuiteApps include user event scripts, ensure these scripts run only in the relevant country contexts. Deploying user event scripts for all localization contexts may lead to unnecessary processing and may negatively impact performance.

Improve your script execution by using the Localization Record Context (LRC) support in the NetSuite application to limit the execution of user event scripts to specific countries. Assign a localization context to each user event script deployment to ensure scripts only run when appropriate for the country or region.

Related Topics

General Notices