Cant hide a particular related list in workspace

Kumar38
Kilo Sage

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());

 

 

22 REPLIES 22

@Kumar38 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

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!

@rafas_10 

could you post a new question for this, share all the details and tag me there?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

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

Animesh Das2
Mega Sage

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