How to restrict View all Approvals in ServicePortal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2025 10:48 AM - edited ‎04-23-2025 10:49 AM
I am trying to restrict Approvals on service portal header menu to only show approvals for certain task records. I modified the SP header menu but when clicking on Approval it shows View All Approvals which is still showing all approvals. View All Approvals have the following
var link = {};
link.title = gs.getMessage('View all approvals');
link.type = 'link';
link.href = '?id=approvals';
link.items = [];
t.items.push(link);
How can I add a condition to restrict by sys_class_name
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2025 03:26 AM - edited ‎04-24-2025 03:28 AM
Hi @samadam
I've provided the soltuion for the similar requirement.
PFB the link.
https://www.servicenow.com/community/developer-forum/how-to-filter-only-sc-req-items-in-the-approval...
Let me know if you have any queries.
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2025 08:36 AM
I did that already the count and drop down works but when View All Approvals is clicked it shows everything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2025 09:08 AM
@samadam Did you make changes to the approvals page?
Once you click view all approvals, it'll take you to the Approvals page.
There you can see OOB widget "approvals". You need to either update that widget or else take a copy and add the new widget to the Approvals page. I've shared the steps for the same in the below community post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2025 04:42 AM
this link has the solution, please enhance
Restrict approval widget to show only RITMs/CRs approval on Service Portal
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader