How to hide related list action button "New" for HR Task?

miro2
Mega Sage

Hi

I'm trying to hide Related List Action button "New" on the HR Agent Workspace (inHR Task related list). This is to prevent agents from creating new HR Tasks when the parent HR Case state changes to "Closed Complete."

However, I noticed that even though the "Add Task" option is hidden, agents can still create HR Tasks via the "New" button after case state is closed complete.

 

miro2_3-1715974213015.png

 

miro2_2-1715974102697.png

 

How to hide/disable "New" button on the HR Task related list if parent HR Cases state is closed? 

It appears the related list action button 'New' is controlled by 'Action Assignment'.
 https://instancename.service-now.com/nav_to.do?uri=sys_declarative_action_assignment.do?sys_id=5555b...

miro2_4-1715974714951.png

 

Using the condition below, I achieve my outcome, 'New' button on the HR Task related list is hidden when the parent HR Case changes to Closed Complete. For other HR case states, the 'New' button remains available.

miro2_6-1715974942695.png

 

My concern is if this is configured correctly. Did I miss something here, or is there a better way to achieve the same outcome? 
Secondly, since this Action assignment table is "Global", am I impacting other tables with this configuration? If so, how to restrict this to HR Task only?

1 REPLY 1

Amitoj Wadhera
Kilo Sage

Hi @miro2 ,

 

Please refer to the below thread:

https://www.servicenow.com/community/developer-forum/how-to-hide-new-button-from-a-related-list-in-t...

 

If you find my response helpful, please consider marking it as the 'Accepted Solution' and giving it a 'Helpful' rating. Your feedback not only supports the community but also encourages me to continue providing valuable assistance.

 

Thanks,

Amitoj Wadhera