How can I reference data in a global scope table from an application in a specific application scope?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2020 01:13 AM
How can I reference data in a global scope table from an application in a specific application scope?
Specifically, I am trying to refer to the data of the globe table by GlideRecord on the server side using Script Include, but I cannot refer to it. I think it's probably a permission issue, but I don't know exactly where and what to set it to work.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2020 02:03 PM
Hello,
In order to access data in a global table from a different scope the global table needs to specifically allow cross scope access. You can validate what access the table allows by navigating to sys_db_object.list. Find the table in question using the Name or label. Open record and look at the 'Application Access' tab. There you will see if the data is accessible from 'This application scope only' or 'All application scopes'. You can also see what access other scopes have:
Hope this helps.
--David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2020 10:58 PM
Thank you very much. When I checked, the setting of'Application Access 'tab was'All application scopes'. Is there any other possible factor? For example, regarding the role, is there any relation between the setting on the application side of the access source and the global scope table side?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2020 11:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2020 11:49 PM
function getName() {
var rec = new GlideRecord('u_test_global_table');
rec.query();
while(rec.next()) {
return rec.name;
}
}
-----
The source code of the corresponding part. I have confirmed that you can pass this code.