Cross Scope Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2024 04:42 AM
Hello team,
I'm running a script in the global application to retrieve a knowledge article whose knowledge base is from the HR core application. However, I'm encountering an error: "Source descriptor is empty while recording access for scope Human Resources: Core: no thrown error Security restricted: Read operation on scope 'Human Resources: Core' from scope 'Global' was denied because the source could not be found. Please contact the application admin."
The script I'm using is :var gr = new GlideRecord('kb_knowledge');
gr.addEncodedQuery('number=KB0169582');
gr.query();
if (gr.next()) {
gs.print("Knowledge sys ID: " + gr.sys_id);
//return gr.sys_id;
}
It seems there is an issue with the scope or permissions, but I am unable to see a record created under caller access module. Any suggestions on how to resolve this?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2024 01:55 PM
Hi, I don't believe it is possible to configure global scope access to a scoped app.
Can you clarify your configuration\intention\business requirement?
Why are you querying a scoped app record from global?
Can you run the script in the scope that's involved?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2024 04:00 PM
Hi @krishnagopal_sn ,
Scripts - Background isn't considered a valid source for Restricted Caller Access/RCA, so this error will appear when trying to query the table directly from another scope there. If you query the table from Scripts - Background with the scope set to sn_hr_core instead of Global, it should allow the query.
Alternatively, you can move your script into a Script Include and then call that Script Include from Scripts - Background. You will then need to go grant access to the generated RCA record for that Script Include.
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda