suiteAppInfo.listSuiteAppsContainingScripts(options)
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 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 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