Script.bundleIds

Note:

The content in this help topic pertains to SuiteScript 2.0.

Property Description

An array of bundle IDs for the bundles that include the currently executing script.

When you use this property, consider the following:

  • The array can contain any number of bundle IDs, because a bundle installation script can be associated with multiple bundles.

  • The array does not contain bundle IDs of deprecated bundles.

  • The elements in the array are sorted in ascending order from the lowest bundle ID to the highest bundle ID that includes the currently executing script.

    However, it is not guaranteed that the last element in the array corresponds to the bundle that triggered the currently executing script during the bundle installation.

Type

string [] (read-only)

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/runtime Module

Since

2015.2

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/runtime Module Script Samples.

          // Add additional code 
...
var scriptObj = runtime.getCurrentScript();
var bundleArr = scriptObj.bundleIds;
...
// Add additional code 

        

Related Topics

runtime.Script
N/runtime Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices