- 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-13-2024 11:19 PM
Hello,
There should be a record on the Cross Scope Privilege table (sys_scope_privilege) which specifies the source scope, target scope, operation should be execute API and target should be the script include.
Make sure the status is set to allowed.
If my answer has helped you in any way please mark it as correct or helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2024 11:09 AM
Thank you for your reply. I created a cross scope privilege record, set the source scope to my scoped application, and target to the script include and operation to execute API, target scope to Global, Status to Allowed. But I still got the same error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2024 11:20 PM
please check the below steps
1) as an admin visit script include from left navigation
2) please search with the name as "script include name".
3) please change the accessible field as "All Application scopes".
Thanks
dgarad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2024 08:12 AM - edited ‎05-14-2024 08:15 AM
Thank you for your reply. I have already set accessible from as "All Application scopes":. But it's not working.