Packages.com.glide.*

chr_kluge
ServiceNow Employee
ServiceNow Employee

Hi Everybody

 

I'm trying to reduce the cusomized content in our instance.

So at the moment I try to figure out if the call of Java Glide classes should be with or without the Package reference?

 

I have a Business Rule using (updated 2013-01-22):

var wfh = Packages.com.glide.db.MultipleUpdate('wf_history');

 

But the SNow version uses (updated 2012-05-29):

var att = new GlideMultipleUpdate('sys_attachment');

 

Which should I use? I read in the commnity that starting with Calgary the Package naming shouldn't be used...

But why is the Package call newer?

 

Thank you very much for your help

Christina

1 ACCEPTED SOLUTION
4 REPLIES 4

Bhavesh Jain1
Giga Guru

Hi Christina,



If you were running a version prior to Calgary and have recently upgraded, it may be worth checking the business rule history to see if it had been customised prior to the upgrade. If so, the code will not have been updated, which may explain why you still see the Package call. Bhavesh's suggestion is great as well as it finds all of the package calls and gives you analysis on whether it should be updated or not.



Cheers, Adam


jcraneNYC
ServiceNow Employee
ServiceNow Employee

The new best practice is to not use the Package call. They are doing away with using the Package calls with the Package Call removal tool, so going forward avoid the package call if you can and use the new Glide classes.


chr_kluge
ServiceNow Employee
ServiceNow Employee

Ok, I installed the Plugin and converted the first Script Include.


Can I ignore those warnings?


packageRemoval.JPG