how to call script include from ux client script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2021 12:12 AM
i have one ux client script include where iam calling script include using glide ajax, can any one tell me whether it is the correct process or not because iam not getting response.
and in ui builder i have one client script there i am exporting ux client script include.
thanks in advance.
- 2,760 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2021 05:17 PM
Hi,
Script include is a server side script, you can make it client callable and call it within the client script using Ajax call.
However, within script include, if you are calling another script include, you dont need ajax.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2024 03:48 AM
Hello @AkshatRastogi,
You said - " if you are calling another script include, you dont need ajax".
I am facing same issue,
could you please provide any example if possible?
?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2024 02:57 PM
Hi not sure if you are still facing the issue but below is an example where incident caller id field is populated only if the user has certain domain:
// IncidentUtils
var IncidentUtils = Class.create();
IncidentUtils.prototype = {
initialize: function () {},
updateIncidentCaller: function (incidentSysId, userSysId) {
var domainChecker = new DomainCheckUtils(); // Another script include
if (domainChecker.hasGmailDomain(userSysId)) {
var incidentGR = new GlideRecord('incident');
if (incidentGR.get(incidentSysId)) {
incidentGR.caller_id = userSysId;
incidentGR.update();
}
}
},
type: 'IncidentUtils'
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2023 07:43 AM - edited 02-20-2023 07:43 AM
Hi Khadir,
Did you manage to call the Script include finally?
I am trying to do the same to use Script includes in the UI builder