suiteAppInfo.listBundlesContainingScripts(options)
Method Description |
Use this method to retrieve the IDs for bundles that contain the specified script, for each script specified. |
Returns |
Object.<String, [int]>, which is a See Syntax for an example. |
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
10 units |
Module |
|
Sibling Module Members |
|
Since |
2021.1 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
string[] |
required |
The list of script ids. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/suiteAppInfo Module Script Sample.
// Add additional code
...
var myScriptIds = {"scriptA", "scriptB", "scriptC"};
var bundlesWithScripts = suiteAppInfo.listBundlesContainingScripts({
scriptIds: myScriptIds
});
// For example, bundlesWithScripts would be:
// {
// "scriptA": [], // there is no bundle that contains this script
// "scriptB": [12], // bundle with bundle ID 12 contains this script
// "scriptC": [12, 123] // bundles with bundle ID 12 and bundle ID 123 contain this script
// }
...
// Add additional code