Hide a tab in related list

Shiva Kumar8
Kilo Guru

Hi Community,

I want to hide a tab in related list named "Application Checklist" (see the attached) and show it to only people from department "XYZ"  or department head is "ABC" person.

Thanks.

1 ACCEPTED SOLUTION

AnirudhKumar
Mega Sage
Mega Sage

First find out the name of your related list.

Open your form , Press F12, and go to Console.

 Type the below and press enter:

g_form.getRelatedListNames()

 

System will print out all the related list names of your form.

Find out which is yours (you can guess this either from the position of the result or from the name)

 

Next use the below line in a client script to hide the related list.

g_form.hideRelatedList('your related list name here');

 

use if else conditions and control the visibility of the related list

View solution in original post

2 REPLIES 2

AnirudhKumar
Mega Sage
Mega Sage

First find out the name of your related list.

Open your form , Press F12, and go to Console.

 Type the below and press enter:

g_form.getRelatedListNames()

 

System will print out all the related list names of your form.

Find out which is yours (you can guess this either from the position of the result or from the name)

 

Next use the below line in a client script to hide the related list.

g_form.hideRelatedList('your related list name here');

 

use if else conditions and control the visibility of the related list

Harneet Sital
Mega Sage
Mega Sage

Hi Shiva Kumar,

Here is what can help you - https://community.servicenow.com/community?id=community_question&sys_id=c3f5b0a6db932300107d5583ca96...

If the answer has helped you, please mark the answer correct/helpful. Thank you.

-Harneet