Get undocumented Service-now class information
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-08-2009 06:27 PM
Hi everyone,
I'm not sure how you deal with undocumented service-now classes. I wrote a simple global business rule which will list all the available constructors and methods of service-now classes.
Create this Global business rule with the attached script.
Normally these classes start with "Packages.com". Few interanl service now classes are
Packages.com.glide.schedules.Schedule
Packages.com.glide.glideobject.GlideDateTime
Go to
System Definition --> Scripts - Background
getClassInfo("com.glide.glideobject.GlideDateTime")
Click on "Run script" button.
it will List all constructors and Methods for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-09-2009 06:37 PM
Great work! Now all we need is a list of classes.
thanks heaps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2010 02:05 PM
Amazing, thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2010 02:06 AM
Somehow this stopped working (since fall 2010). Errormsg below.
*** Script: Class Information for : com.glide.glideobject.GlideDateTime
Security restricted: access to restricted class name java.lang.Class
Security restricted: access to restricted class name java.lang.Class
Evaluator: org.mozilla.javascript.EcmaError: [JavaPackage java.lang.Class.forName] is not a function.
Caused by error in Business Rule: 'getClassInfo' at line 3
1: function getClassInfo(className){
2: gs.print("Class Information for : "+ className);
==> 3: var classObj = java.lang.Class.forName(className);
4: var methods = classObj.getMethods();
5: // Getting Constructor information
6: var ctorlist = classObj.getDeclaredConstructors();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2011 07:38 PM
😞 Doesn't work anymore