SuiteScript 2.x Bundle Installation Script Reference

A bundle installation script's functions run automatically during bundle install, update, or uninstall, based on these triggers or entry points::

A bundle installation script file should include at least one entry point. If you are using multiple entry points, you should include them in the same script file.

The following are example uses for each entry point:

Two specialized parameters are available to functions in bundle installation scripts to return the version of bundles as specified on the Bundle Basics page of the Bundle Builder.

A bundle installation script file can call functions in other script files, as long as those files are added as library script files on the script record. Any .js library script files are automatically included in the bundle when it's added to target accounts.

Bundle installation scripts can call scheduled scripts, but only in the afterInstall and afterUpdate entry point functions. Calls to scheduled scripts aren't supported in the beforeInstall, beforeUpdate, or beforeUninstall entry points.

Bundle installation scripts have a 10,000 governance unit limit per execution.

You can create multiple deployments for each bundle installation script, each with different parameters, but only one deployment can be associated with each bundle. When you associate a bundle installation script with a bundle, you choose a specific script deployment.

Bundle installation scripts need to be executed with administrator privileges. The Execute as Role field should always be set to Administrator on the script deployment record.

Bundle installation scripts can only be run in target accounts if the Status is set to Released. You can set the Status to Testing if you want to debug the script but it must be set to Released when you are done testing.

Related Topics

General Notices