How to hide the New button in the Teams related list for non-admin users on Service/Service Offering
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hello Community,
On the Service and Service Offering records, there is an OOTB related list called Teams.
In this Teams related list, the New (and Edit) buttons behave as follows:
• For admin users, the New and Edit buttons are visible and records can be created/edited as expected
• For non-admin users, clicking the New button opens the record in read-only mode
Our requirement is to hide the New (and Edit) buttons completely from the form UI for non-admin users on the Service and Service Offering tables, instead of showing the button and opening a read-only form.
What we have tried:
• Implemented Omit Rules on the related list, but the New button is still visible
• Checked form-level configurations, but could not suppress the button
Requirement:
• Hide the New buttons in the Teams related list for non-admin users
• Apply this only on Service and Service Offering forms
Could you please advise:
• Whether this behavior is controlled via ACLs, UI Actions, Related List properties, or OOTB CSDM logic
• The recommended technical approach to hide these buttons at the form / related list level.
Any technical guidance or best practices would be appreciated.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
simply give in New role field the admin role and no scripting required
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @nayanmule and @Ankur Bawiskar ,
I checked your suggestion by declaring the user value and assigning only the admin role. However, I’m still not getting the expected result. The new button is still visible in the related list for non-admin accounts.
var answer = true;
if (!user.hasRole('admin')) {
answer = false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
so even after giving admin in New roles it's still showing for non-admin?
no scripting required.
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @Ankur Bawiskar ,
Yes correct, even after giving admin in New roles it's still showing for non-admin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
then ensure Table.None CREATE ACL on that related list table has role as admin
OR
Use this script in Omit new condition
answer = !gs.hasRole('admin'); // if true means omit if false means don't omit
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
