suiteAppInfo.listSuiteAppsContainingScripts(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Use this method to retrieve the ID for the SDF SuiteApp that contains the specified script, for each script specified.

Only one ID will be returned for each specified script.

Returns

Object.<String, null|String>, which is a {scriptId: suiteAppId|null} mapping.

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

N/suiteAppInfo Module

Sibling Module Members

N/suiteAppInfo Module Members

Since

2021.1

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.scriptsIds

string[]

required

The list of script ids.

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/suiteAppInfo Module Script Sample.

            // Add additional code
...
var myScripts = {"scriptA", "scriptB", "scriptC"};
var suiteAppsWithScripts = suiteAppInfo.listSuiteAppsContainingScripts({
    scriptIds: myScripts
});
// For example, suiteAppsWithScripts would be:
// {
//    "scriptA": null,            // there is no SuiteApp that contains this script
//    "scriptB": "SuiteAppX",     // SuiteAppX contains this script
//    "scriptC": "SuiteAppY"      // SuiteAppY contains this script
// }

...
// Add additional code 

          

Related Topics

N/suiteAppInfo Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices