Need to hide "Add / Edit / Remove" buttons from Approvers related list in SC Task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a requirement to hide the Add, Edit, and Remove buttons from the Approvers related list (sysapproval_approver) on an SC Task after a particular task is closed complete.
I created a Client Script (onLoad) on the sc_task table using:
But the buttons are not hiding.
I also tried placing the script inside a UI Policy with no success.
Is there a reliable way to hide the Add / Edit / Remove related list buttons for the Approvers list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi,
The buttons are there as long as you have access to create/modify/delete records in that table.
You can hide the related list altogether with an UI policy and UI policy related list action if that's what you're after.
Otherwise you'll need to configure the list control of the related list, and omit the buttons (and probably set a condition for when the button should be omitted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
I found the buttons in Related list actions.
But
I am working on a custom Edit button for the sysapproval_approver table . The requirement is:
Block editing if the approval state is requested, approved, or rejected.
Allow editing only if the state is 'not yet requested'.
Show an error message when editing is blocked.
I tried the following approaches:
Server-side UI Action using current.setAbortAction(true) and gs.addErrorMessage() — works perfectly for a Remove button, but for Edit, the M2M edit page does not open correctly.
Client-side GlideAjax / Script Include — logic works, but asynchronous calls and scope issues prevent reliable M2M page opening.
I want a solution where the Edit button:
Blocks editing for processed approvals
Opens the M2M edit page when allowed
Works reliably on forms, related lists, and M2M templates
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
script you shared won't work in workspace
OOTB I couldn't find New, Add, Edit button on Approvers Related list on sc task form
seems somebody added that with some custom solution
💡 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