Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Get undocumented Service-now class information

User150433
Kilo Sage

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.

16 REPLIES 16

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?


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