- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2024 11:14 PM - edited 05-14-2024 12:38 PM
Hello everyone.
I'm trying to access a script include from a scoped application catalog item client script. The client script use GlideAjax call server-side script include to return office location based on user. I passed user sysId to the script include. But I got error message: Access to Script Include XXXXX blocked from scope application x_123455_xxxxxx. The Script include is global and check Client callable, accessible from All application scopes.
I tried to call other global script include and got the same error message.
Anyone know what's going on. I used other scoped application to call the same script include and no such error. It seems like this scoped application has some property need to be set correctly.
Thank you in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 08:31 AM
Hi @ShuRiseUp2023 ,
Could you please share the client script which you have written ?
and also while GlideAjax try adding script include api name which will be something like below,
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 12:36 PM
Thank you everyone for your help. I have solved this problem. Just add a global. before the script include.
var ga = new GlideAjax('global.getLocation'); // getLocation is the script include class
Do we always have to add a "global." in front of the script include when calling in the Client Script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 08:31 AM
Hi @ShuRiseUp2023 ,
Could you please share the client script which you have written ?
and also while GlideAjax try adding script include api name which will be something like below,
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 12:56 PM
Thank you for your answer. I figured it out on my own before I saw you post! Yes. I just added a global. in my client script and it works. As I understanding when other scripts call this script include they need to use the API Name instead of Name, right? If other script in the same scope call it is the global is still needed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 01:14 PM
@ShuRiseUp2023 if the scope is same then no need to use api name just script include name will work.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2024 12:36 PM
Thank you everyone for your help. I have solved this problem. Just add a global. before the script include.
var ga = new GlideAjax('global.getLocation'); // getLocation is the script include class
Do we always have to add a "global." in front of the script include when calling in the Client Script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2025 04:20 PM