Hide the ‘New’ button for related lists when the HR case state is ‘Closed Complete’

may13
Tera Contributor
In Employee Relations within HRSD in ServiceNow, in the HR Agent Workspace, if an HR case is in the ‘Closed Complete’ state, I want to automatically hide the ‘New’ button for all related lists, such as Interview, Involved Parties, Allegation, and Evidence.

State is "Closed Complete"

may13_0-1764832594363.png

Allegation " NEW " Button 

may13_1-1764832722071.png

Interview " New "Button

may13_2-1764832775784.png

 



5 REPLIES 5

Shruti
Giga Sage
Giga Sage

Hi

Navigate to Now experience framework-> Related list actions

Open below 2 action assignments sysid = a5c1ccc2eb9f1110afa96bf3a2522864 , 5555b77273131010a0a79329faf6a780

and update the script condition

 

Shruti_0-1764836948224.png

Shruti_1-1764837042476.png

 

 

may13
Tera Contributor

@Shruti     In the script condition, what do I need? My requirement is: when the HR case is ‘Closed Complete’, users should be unable Create New any records in the related lists We need to hide New Button.

Update script condition parent.active==true for both declarative action assignments. New button will not be visible if state is closed

Ankur Bawiskar
Tera Patron
Tera Patron

@may13 

You can handle this by updating Table level CREATE ACL on those Related list tables

in that check the Parent State [IS NOT] Closed Complete

This will ensure the ACL passes only when HR Case is Not Closed and it will block the NEW in both Native + Workspace in related list

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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