Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

How to hide “New” button on Incident list view and show only for specific role (group_manager)?

SaitejaN
Tera Contributor

Hi Everyone,

 

I’m working on a ServiceNow requirement to control the visibility of the “New” button in the Incident list view.

The requirement is:

  • The “New” button should be visible only to users with the group_manager role

  • It should be hidden from all other users

I’d appreciate any guidance or best practices based on your experience.

Thanks in advance!

1 ACCEPTED SOLUTION

AhsanM
Tera Expert

The cleanest and most upgrade safe approach is to use an Access Control Rule. Create an ACL on the incident table for the "create" operation and restrict it to users with the group_manager role. This hides the New button automatically for users who do not have create access.

Go to Security > Access Control > New and set:

  • Operation: create
  • Table: incident
  • Role: group_manager

Hope this helps!

Ahsan
ServiceNow Developer & Admin
Builder of NowFixer | Free AI debugging tool for ServiceNow scripts

View solution in original post

2 REPLIES 2

Tanushree Maiti
Kilo Patron

Change the UI Action (https://<your instance name>/nav_to.do?uri=sys_ui_action.do?sys_id=c9ce66b4d703120060faef637e610334) condition 

 

from (OOB): 

(new GlideRecord(current.getTableName())).canCreate() && !RP.getListControl().isOmitNewButtonWithoutChecks() && !RP.isRelatedList()

 

to:

(new GlideRecord(current.getTableName())).canCreate() && !RP.getListControl().isOmitNewButtonWithoutChecks() && !RP.isRelatedList() && gs.hasRole('group_manager')

 

 

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

AhsanM
Tera Expert

The cleanest and most upgrade safe approach is to use an Access Control Rule. Create an ACL on the incident table for the "create" operation and restrict it to users with the group_manager role. This hides the New button automatically for users who do not have create access.

Go to Security > Access Control > New and set:

  • Operation: create
  • Table: incident
  • Role: group_manager

Hope this helps!

Ahsan
ServiceNow Developer & Admin
Builder of NowFixer | Free AI debugging tool for ServiceNow scripts