The CreatorCon Call for Content is officially open! Get started here.

Service Portal FullCalendar

xiaix
Tera Guru

Just wanted to share some work I've done for those who would like to incorporate FullCalendar (FullCalendar - JavaScript Event Calendar ) into your Service Portal.

Here is what mine looks like now:

find_real_file.png

find_real_file.png

All the code is attached to this post (FullCalendar_For_ServicePortal_Helsinki.zip)

I hope someone finds it useful.

Message was edited by: David Dunn (** Updated code to fix Quick Access Event adding and coloring bug(s))

Message was edited by: David Dunn *MAJOR UPDATE*..   See my post below, on July 30, 2017

79 REPLIES 79

Also... my code does a lot of console.warn() and console.info() messaging.  Please hit F12 in your browser and look for warnings, logs, and errors that may be relevant.

Hi David,

I went through it all again today, I get no errors or warnings that are different from my previous ones, like below.

find_real_file.png

You are right (obviously) the selection widget cannot find the calendar widget so when the calendar widget looks to find the length of the array, that is where the error occurs.

find_real_file.png

I went through both widgets and checked to make sure I had c_this, I do, I also made sure that I have id="mainCalSelDIV" in the HTML of the selector widget. 

I even went back and named the portal page /bm?id=snsp_cal_calendar_selection and made sure the widgets were named like your and with the widget ID below

snsp_cal_-_calendar_selection

snsp_cal_-_calendar

To be honest I cannot see what I am doing wrong, it looks like it should, it isn't going to be the dependencies. 

I have a feeling I may be out of options as you can only do so much. 

Let me know if you have any other ideas?

Sorry!


Cam.

Ok, please verify that you have the following Service Portal pages:

find_real_file.png

 

And of course, verify that each associated widget is on each page.

 

If so, please attach the XML version of both widgets (SNSP Cal - Calendar Selection and SNSP Cal - Calendar).

Like this:

find_real_file.png

 

 

I'll take a thorough look through to see if there's anything in the code causing this issue.

Righty-o David, 

I though I was going to be very embarrassed as I actually took your instructions literally and only had one page, and had both the selector and the calendar widget on the selector page. the note of 'no need for multiple calendar pages' obviously stuck with me lol. 

Upon realising that foolish error, I can get the calendar to show if I type in the URL however the selector still wont select a calendar, in fact, the URL now wont swap to the 

snsp_cal_calendar&sysparm_calID=29

It just stays as the snsp_cal_calendar_selector

No I know you will notice that there is no - in the page URL, this is because in London every time I try to match your text exactly the - gets removed, so I had to attempt to change that URL in the client script in the widget.

I have attached the xml files, I'm gonna be so angry with myself if you find something basic I've done wrong. 

Once again, thank you!

Well, I see your issue.

 

In the "SNSP Cal - Calendar Selection" widget:

 

 

 

 

find_real_file.png