How to use data results from script include...
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi everyone...
I am stuck right now and really appreciate any help.
I created a script include (server side) to fetch data via new GlideRecord and want to return them to the UI.
Script Include (client callable: true, all application scopes, acl is there snc_internal)
```
var TG_TeamCalendarAppointmentService = Class.create();
TG_TeamCalendarAppointmentService.prototype = {
initialize: function () {
gs.info("Initialized TGTeamCalendarAppointmentService");
},
getEvents: function (opts) {
opts = opts || {};
var tableName = opts.tableName || 'sn_customerservice_appointment';
var fields = opts.fields || {
userRef: 'to',
startField: 'start',
endField: 'end',
titleField: 'subject',
groupLabel: 'to_users'
};
var out = { events: [] };
......
return out;
},
type: 'TG_TeamCalendarAppointmentService'
};
```
Databroker Scriptlet
```
function handler(input) {
var svc = new TG_TeamCalendarAppointmentService();
return svc.getEvents({..});
}
```
However, no matter how I want to call my script include in frontend - it wont work.
Data Broker Scriptlet -> GlideAjax and the Script Include Class Name are undefined / not found
UI Builder Client Script -> GlideAjax and the Script Include Class Name are undefined / not found
I am a bit lost and just need to understand the way of using script includes within my ui builder...
0 REPLIES 0