Get Protected Script Include Code
Import
·
Apr 19, 2024
·
article
We can get all the functions created in the protected script include using below code.
var instance=new scriptIncludeName(); /**name of script include**/
var list=[];
for(var prop in instance){
gs.info(prop);
var temp=instance[prop] instanceof Function ? instance[prop] :JSON.stringify( instance[prop]);
list.push(prop+": "+temp );
}
gs.info("\n"+list.join("\n"));
Note: If the script include extends any other class, we will be not able to view that using the above script.
Please mark it helpful if you feel it helps you in any manner.
Thanks,
Pradyumna Das
View original source
https://www.servicenow.com/community/developer-articles/get-protected-script-include-code/ta-p/2902941