Error in brule

Vimal Priya
Giga Guru

Hi All,

I am getting an error when using

car str= new GlideStringUtil() and

var a = new sysAttachment()

error message - illegal access of GlideStringUtil in the script

8 REPLIES 8

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Vimal,



GlideStringUtil is not allowed in scoped applications.


Please let me know if you have any questions.


Can confirm this



Evaluator: java.lang.SecurityException: Invalid object in scoped script: [JavaClass com.glide.util.StringUtil]


  Caused by error in script at line 1



==> 1: var str = new global.GlideStringUtil();



Evaluator: java.lang.SecurityException: Invalid object in scoped script: [JavaClass com.glide.util.StringUtil]


  Caused by error in script at line -1


Background message, type:error, message: Invalid object in scoped script: [JavaClass com.glide.util.StringUtil]



ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022

Gurpreet07
Mega Sage

Well GlideStringUtil   shouldn't through this error because you are using Glide Class and not java package. Have a look ain following threads.


Re: Can Package calls be turned on or off?


Calgary or Dublin Releases block out many package calls


The SN Nerd
Giga Sage
Giga Sage

Solution given in other thread



How to use/replace GlideStringUtil for scoped app?



It will be corrected in a future Fuji release.





ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022