- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2023 06:42 AM
In the related list a can see the "NEW" button always visible , how to restrict that to only for a particular group only.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2023 06:49 AM
Hi @VIKAS MISHRA ,
Please see article: https://www.servicenow.com/community/in-other-news/managing-the-new-and-edit-buttons-on-related-list... paragraph 5:
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2023 07:02 AM
Hi @VIKAS MISHRA,
Here is sample script you have to use to hide "NEW" Ui action in related list
var currentUser = gs.getUserID();
var group = 'IT Support'; // replace with the group name you want to hide the UI action for
var isMember = gs.hasRole(group) || gs.getUser().isMemberOf(group);
if (isMember) {
return false; // hide the UI action
}
return true; // show the UI action
I hope this helps!
Regards,
Hemant
**If my answer has helped with your question, please mark my answer as an accepted solution and give it a thumbs up.
**