
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 06:12 AM
Hello Everyone,
I need to get the list of tables who extends Task Table.
Using Task Table sys id we can Glide on sys_db_object and get the list of those tables, using below script -
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 06:26 AM
Hi Chinmay,
I already did that kind of script to get the full hierarchy of a table like 'task' :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 06:20 AM
You can use this, but if someone else creates a table called 'Task' in the future it might mess up your script.
'super_class.name=Task'
If i were you I would stick with using the table's sys_id. This is never going to change, so in this case the hard coded sys_id is probably best
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 06:22 AM - edited 11-09-2022 06:23 AM
The best practise is to create a system property in "sys_properties" table.
create a property with any name maybe "table_id" and add the sys_id there in value field. After that make below changes to your code:
sysDbObj.addEncodedQuery('super_class='+gs.getProperty('table_id'));
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2022 06:26 AM
Hi Chinmay,
I already did that kind of script to get the full hierarchy of a table like 'task' :