
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2012 09:11 AM
I am currently building maintenance schedules for each of our business services. Each schedule might have multiple time slots for maintenance.
I noticed that if I go into the schedule, I can use the UI action to call "show_schedule.do" and it appends one sys_id to the end and displays all times for that ONE schedule.
My question is: Is it possible to build a url that would allow me to see multiple SCHEDULES on one calendar with multiple time slots in each schedule? And if so, how would I go about that?
Solved! Go to Solution.
- Labels:
-
Change Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-22-2012 11:23 PM
The change collision plugin has a nice simple example of how to add multiple schedules into a Schedule Page [cmn_schedule_page], for display on the same calendar - look at "Maintenance Windows and Changes", which builds up the schedulePage object with multiple schedules in varying colours.
Documentation here: http://wiki.service-now.com/index.php?title=Schedule_Pages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2014 10:32 PM
Thank you Stephen,
for a very quick reply. I can get the URL parameters on the Client Script side now, but wondering about the last part. How to "move" them to Server AJAX processor side, since that's where I really need them?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2014 10:43 PM
Sorry, I guess I failed to mention that part. In the client script, you also need this line:
var myparam1 = gel('myparm1').value;
schedulePage.addParam('myparam1', myparam1);
schedulePage.setPageTitle('some title');
schedulePage.run();
Then, in the ajax call do this:
var someparm1 = schedulePage.getParameter('myparam1');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2014 11:15 PM
Thanks again. But I'm still failing with schedulePage. Where and how is that defined? It seems that Client Script fails during schedulePage related statements.
Here's what I have on the Client Script
var change = gel('change_id').value;
var ci = gel('ci_id').value;
alert("get parameters CI = " + ci + ", Change = " + change);
schedulePage.addParam('change_id', change);
schedulePage.addParam('ci_id', ci);
schedulePage.setPageTitle('Change Planning');
schedulePage.run();
alert("parameters set CI = " + ci + ", Change = " + change);
And this on the Server AJAX processor side:
var change_id = schedulePage.getParameter('change_id');
gs.log("Schedule page for Change : " + change_id, "Schedule");
var ci_id = schedulePage.getParameter('ci_id');
gs.log("Schedule page for CI : " + ci_id, "Schedule");
But what happens in that the first alert on client side return correct values. Second alert (I know it doesn't make sense) never appears and script log is showing null for both variables.
As you can see, this is my first attempt with Schedule Pages which are not that well documented in Wiki (Calendar compared to Timeline version). So, I thank again for your patience and help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2014 11:24 PM
I think perhaps when you run, everything after that might be discarded? I don't have anything after the run.
Also, is your client script wrapped in a function? Something like "initme"
function initme() {
// stuff
}
And then there's a box lower down called:
Init function name:
where you put "initme" in it.
Also, try a gs.log("HERE IS MY CI SYS ID: " + schedulePage.getParameter('ci_id')); in the ajax script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-12-2014 12:19 AM
Now its working!
Thank you so much. I would like to mark your replies as Correct Answers also, but since that's not possible, I just like them a lot