Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Hide Related List UI Action

BoHyun Jung
Mega Sage

When SCTask's state is Closed Complete, I want to hide the new button in Related list

 

BoHyunJung_0-1687151831535.png

BoHyunJung_1-1687151952583.png

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@BoHyun Jung 

Steps

1) right click on the list header for Releases related list

2) Configure list control

3) Use Omit New condition script and add this script

AnkurBawiskar_0-1687153116938.png

 

if(parent.state.toString() == '3')
	answer = true; // omit
else
	answer = false; // show

AnkurBawiskar_1-1687153244871.png

 

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

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@BoHyun Jung 

Steps

1) right click on the list header for Releases related list

2) Configure list control

3) Use Omit New condition script and add this script

AnkurBawiskar_0-1687153116938.png

 

if(parent.state.toString() == '3')
	answer = true; // omit
else
	answer = false; // show

AnkurBawiskar_1-1687153244871.png

 

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

AJ2025
Tera Contributor

You need to click on the hamburger menu of one of the columns in the related list to get the configure option.