Hide a new button in a related list

Cirrus
Kilo Sage

Our requirement is this:

In project workspace we have two related lists, both on pm_project_task table - one is filtered by parent, the other by top project. We dont want users to be able to create new tasks from the top project related list, as it creates them with an incorrect top project.

Obviously we can Omit New on the list control view in the back end, but this doesnt hide the new button in workspace. This appears to be controlled by a UX Declaritive Action 'New' in global. If I set active = false it removes new from both related lists. The following article suggests to create an action exclusion on the pm_project_task table, but again this would hide it for both related lists.

 

https://www.servicenow.com/community/spm-forum/configuring-new-project-workspace-remove-button-amp-c...

 

Does anyone know how we could remove the new option for just the related list filtered by Top Project??

5 REPLIES 5

pr8172510
Mega Guru

Hi Cirrus,

Yeah, you’re on the right track — and you’ve already hit the key limitation.

In Workspace, the “New” button is controlled by Declarative Actions, not by list control settings, and those actions are applied at the table level, not per related list instance. That’s why:

  • Disabling it removes it everywhere
  • Action exclusions also apply globally for the table

 

There’s no OOTB way to hide the “New” button for only one related list when both are on the same table.


What you can do (workarounds)

1. Use condition on Declarative Action (best option)

Instead of disabling the action, add a condition to the “New” declarative action so it only shows in the correct context.

You can check things like:

  • Parent record context
  • Relationship conditions
  • Encoded query / parameters

Example idea:

  • Show “New” only when the related list is based on parent
  • Hide when it’s coming from top_project

This usually involves checking the context passed to the component (like parent record sys_id or relationship field).


2. Create a custom Declarative Action

If the OOTB one is too generic:

  • Clone the “New” action
  • Add your own condition logic
  • Disable OOTB one

This gives you full control over when it appears.


3. UI Builder override (advanced)

If conditions aren’t enough:

  • Go to UI Builder → Workspace page
  • Locate the related list component
  • Override actions for that specific component

This is the only way to get true per-related-list control, but it requires customization.


4. Defensive backend logic (recommended anyway)

Since users might still find ways to create records:

  • Add a Business Rule:
    • If created via top_project context → correct or block it

Rakesh_M
Tera Guru

Hello @Cirrus ,
 Try to hide using client conditions

 
 

Screenshot 2026-03-26 at 4.17.41 PM.png


regards
Rakesh

Tanushree Maiti
Kilo Patron

Hi @Cirrus 

 

Check the steps mentioned in the following post. If it helps.

 

https://www.servicenow.com/community/developer-forum/configuring-new-project-workspace-remove-button...

 

Please mark this response as Helpful & Accept it as solution if it assisted you with your question.
Regards
Tanushree Maiti
ServiceNow Technical Architect
Linkedin:

Ankur Bawiskar
Tera Patron

@Cirrus 

I could see only 1 Related List with Parent filter

which other you are referring?

55.png

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