Hi Team – trying to use the following snippet of code to get the script name var scriptName = script.name;
but I keep geting message “Can’t find Variable: script” Is the script API no longer supported?
thanks,
rocky
Hi Rocky,
This is supported, but you need to get the Script object first.
Try this:
var script = form.getScriptNamed("My Script");
var scriptName = script.name;
console.log(scriptName);
See if that works for you.
But also, there is a built-in variable called scriptName
that you could simply access to get the name of the currently executing script.
So just try:
console.log(scriptName);