ServiceNow Things to Know 41: GlideTableHierarchy API
function getExtendedChildedTableName(parentName) { var grDBObject = new GlideRecord('sys_db_object'); grDBObject.addQuery('super_class.name', parentName);
grDBObject.query();
while (grDBObject.next()) { gs.print(grDBObject.name);
}}
Output:*** Script: sn_hr_core_case_workforce_admin*** Script: sn_hr_core_case_talent_management*** Script: sn_hr_core_case_payroll*** Script: sn_hr_core_case_total_rewards*** Script: sn_hr_core_case_operations*** Script: sn_hr_core_case_corporate_communication*** Script: sn_hr_core_case_benefits*** Script: sn_hr_core_case_global_mobility
*** Script: sn_hr_core_case_compensation
Option 2 isvar table = new GlideTableHierarchy();
gs.info(table.getAllExtensions());
If my content helped you in anyway, please mark this content as BOOKMARK, SUBSCRIBE & HELPFUL
Best Regards,
Prashant Kumar (LearnIT)
YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant
Blog LearnIT: https://medium.com/@LearnITbyPrashant
Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/
ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635
https://www.servicenow.com/community/developer-blog/servicenow-things-to-know-41-glidetablehierarchy-api/ba-p/2769707