g_form.getRelatedListNames()
Output:
(7) ['task_sla.task_list', 'REL:4fb3613cdb333200c53dd8c0cf961966_list', 'sc_task.parent_list', 'REL:b9edf0ca0a0a0b010035de2d6b579a03_list', 'REL:92a2c254eb3102005ecfa9bcf106fe74_list', 'kb_knowledge_block.source_list', 'REL:d12dcae953113010b2a2ddeeff7b1270_list']
g_form.hideRelatedList('REL:b9edf0ca0a0a0b010035de2d6b579a03_list');
How to hide related list in ServiceNow
Working Code Asked question July 6, 2023