GlideHistorySet is not allowed in scoped applications

Suganya9
Tera Contributor

Hi All,

When I used 'GlideHistorySet' in one of the script include in my scopped application am getting the below error.

"Exception Message: JavaException: java.lang.SecurityException: GlideHistorySet is not  allowed in scoped applications"

May I know the alternative method for 'GlideHistorySet' in scopped application.

Thanks in Advance!

1 ACCEPTED SOLUTION

To access the protected class, in GLOBAL you need to make a script include that runs the protected class.  You need to ensure the new script include (in GLOBAL) is accessable to scopes.  Then call the new Script Include (that is in GLOBAL) from your scope.

This is how you bypass that protection.

View solution in original post

6 REPLIES 6

Jace Benson
Mega Sage

If you need access to a Script include protected this way the simpliest way to access it is to make a new Script Include that wraps the call you want to make that is accessible to your scope.

Hi Jacebenson,

 

Am already using the GlideHistorySet method in a new script include which was created in the custom scope. But still am facing the above mentioned error.

 

Thanks,

Suganya N

To access the protected class, in GLOBAL you need to make a script include that runs the protected class.  You need to ensure the new script include (in GLOBAL) is accessable to scopes.  Then call the new Script Include (that is in GLOBAL) from your scope.

This is how you bypass that protection.

This was super helpful! We weren't allowed to develop in Global Scope so I was pleasantly surprised to find that SN already has a script include for this scenario!

/nav_to.do?uri=sys_script_include.do?sys_id=b98b791577d92110a8b1f335ae5a9955 

 

Called it from a Scoped App widget like this:
new global.RecordHistoryDataGenerator().generateHistoryData("table name", sysID of record); // generate history set