Can Package calls be turned on or off?

benjaminnuttin
Mega Contributor

I have a script that calls Packages.com.glide.util.StringUtil. It works in one of my instances, but not in an other one. I've compared system properties and build info, and cannot find any relevant difference between the two instances.

I know I can replace that package call with GlideStringUtil, and in fact that solves the issue, but I would like to understand how one instance allows the package call and the other doesn't.

7 REPLIES 7

Ben, correct, only ServiceNow Support can modify this. Please see my response below as you really don't need to whitelist your package call, there is a new method of calling it.


I understand there are replacement calls for packages, and i already replaced by code, but I was just curious as to why the package call would work in one of my instances, and not in the other.


Michael Ritchie
ServiceNow Employee
ServiceNow Employee

ServiceNow introduced API calls for the most commonly used package calls.   Please see this page for details:


http://wiki.servicenow.com/index.php?title=Packages_Call_Replacement_Script_Objects#gsc.tab=0



For you case:


Packages.com.glide.util.StringUtil   = GlideStringUtil



As noted in the article there is a package call removal tool that will go through your scripts and replace the known package calls with the appropriate new API call.   It presents a list to you for you to then validate before updating, but you may also find this useful.



You shouldn't ever need to whitelist a package call as most now have API calls.