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
‎07-19-2016 04:28 AM
This is great, but is it also possible to find the parameters?
I want to use GlideScheduleDateTime.addDays to add X business days to a certain datetime. For example, get the date within 7 business days from now. How do I initialize the GlideScheduleDateTime, with the schedule? Or how do I add the schedule to it?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-30-2016 01:07 PM
Hi Peter,
I believe if you reference the object member as well (not just the member name) it will spit out either the member value or the definition if it is a function.
(i.e.)
var sched = new GlideSchedule();
for(var member in sched){
gs.print(member + ": " + sched[member]);
}
Sorry, I don't have time to test it out right now, but I'm pretty sure that's what I had used in the past.
Thanks,
-Brian