Cant hide a particular related list in workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 10:28 PM - edited 03-17-2025 11:15 PM
I have to hide related lists to certain users. one of the related list is only visible on configure > related list, but not on form. Created a client script, it hid all the related lists on form , however it is not hiding the one that is not shown on form in Workspace.
This one is of relationship type and is added on selected realted lists but not visible on the form. However I can see the related list name (REL:xxxxxx) when printing logs in Client script. checked for any existing Client scripts , UI policies, Didn't find any.
g_form.hideRelatedLists(g_form.getRelatedListNames());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2025 10:31 PM
Strange.
share how it looks in workspace view when it's not getting hidden?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2025 01:21 AM
Hi @Ankur Bawiskar ,
In your opinion what is the best way to hide the 'Child cases' related list if it has a parent?
So, I only want the 'Child cases' related list to appear if the case itself doesn't have a parent. If he has a parent, it doesn't show.
Whats the best approach?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2025 01:39 AM
could you post a new question for this, share all the details and tag me there?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2025 04:59 AM
Hi Ankur,
I found the solution for this. But will tag you in a different topic since you might know the answer 🙂
Regards,
Sérgio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 10:50 PM - edited 03-17-2025 10:53 PM
Hi @Kumar38 ,
Can you try to hide each table to which the related list/s are referring to modify the line of code in your script as shown below. You may use array of the tables as well and loop through to use each table name into g_form.hideRelatedList();
g_form.hideRelatedList('<related list table name1>');
g_form.hideRelatedList('<related list table name2>');
g_form.hideRelatedList('<related list table name3>');
If this address your question, please don't forget to mark this response correct by clicking on Accept as Solution and/or Kudos.
You may mark this helpful as well if it helps you.
Thanks,
Animesh Das