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

If I run in executor its hiding it. as far as view its set to empty

@Kumar38 

in executor it's working then it means it should work in client script as well.

Since you said view is empty then it should hide

Is it not hiding with this line? what's the concern?

		g_form.hideRelatedList('REL:595d5cad3b720010d901655593efc479');

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

It is not hiding this one particular whatever approach I take , rest of them are working fine , they contain scripted relationships and related lists too

@Kumar38 

simple have only this line in your client script and see if it hides

		g_form.hideRelatedList('REL:595d5cad3b720010d901655593efc479');
Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

My code is working in default view , however in workspace view it hides all except the one I'm running into issues with. Tried testing with CS in global , workspace view . same problem exists