How to get table hierarchy in Scoped applications

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-09-2016 04:58 AM
Hi all,
I am trying to get table hierarchy for a particular table using TableUtils script include. This is working fine for Global applications. If i apply the same for scoped applications i am getting "Illegal access to Script include" error because the TableUtils script include is restricted to only Global application.
Is there any other way to access the table hierarchy in scoped applications?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2018 07:00 PM
I'm using TableUtils in script include....below is the script...getTables contains GlideDBObjectManager
var tu = new global.TableUtils(sysClass);
var classHierarchy = tu.getTables().toArray();
ciClassH=classHierarchy.join(':');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-11-2019 05:14 AM
GlideTableHierarchy is the API used to get get table hierarchy in Scoped applications.
Specifically the code below will get it
var table = new GlideTableHierarchy("cmdb_ci_server");
gs.info(table.getTables());
Please mark helpful or correct if this solves your problem.
Thanks,
Brent