I have created a UI Page fullcalendar and put that in a variable type ui page for a record producer

R0810
Tera Expert

I have a UI page which is using the fullcalendar library, we have html part and client scripts where we process events generated through glideajax call. Everything is inside a scoped application, when we try the Ui page using try it it shows all events displaying on the calendar but when we try the catalog item try it option the calendar loads but does not shows any events on it. can anyone please assist here

below is the ui page client script:

document.addEventListener('DOMContentLoaded', function() {
var calendarEl = document.getElementById('container_name');
var calendar = new FullCalendar.Calendar(calendarEl, {
initialView: 'dayGridMonth',
events: function(fetchInfo, successCallback, failureCallback) {
var ga = new GlideAjax('script_name');
ga.addParam('sysparm_name', 'function_name');
ga.addParam('sysparm_event_name', 'event_name');
ga.getXMLAnswer(function(response) {
if (response) {
var events = JSON.parse(response);
successCallback(events);
} else {
failureCallback('Error fetching events');
}
});
},

});
calendar.render();
});

1 REPLY 1

Ankur Bawiskar
Tera Patron

@R0810 

I won't recommend this much customization.

This might work only in native, UI page doesn't work on portal

How will you use this on portal then?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader