- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2024 01:02 AM
Hello Experts,
I am currently working on custom service portal and I have received this requirement to show OOB 'approvals' header menu on customised service portal....so far I have added the menu item by navigating to the Service portal----> menus--->new.....The issue is the newly added menu item is not at all reflecting on the service portal?
On the widget record I could see there is angular dependency and they have added angular template also,
I was thinking, may I be I have to add template entry for the newly added menu item also?
Could anyone please help me out here?
Any kind of help is highly appreciated!
Thank you in advance,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2024 05:55 PM
Do like this
Create a Script include
var approvalUtils = Class.create();
approvalUtils.prototype = {
initialize: function() {},
checkApprovals: function() {
var grApproval = new GlideRecord('sysapproval_approver');
grApproval.addQuery('approver', '=', gs.getUserID());
grApproval.addQuery('state', '=', 'requested');
grApproval.query();
return grApproval.hasNext();
},
type: 'approvalUtils'
};
Create a duplicate menu item "Approvals" like this
Configure this menu item like this
This will show you when you don't have any approvals. The other one will show when it has approvals.
Please mark my answer correct and helpful if it works.
Thanks,
Narsing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2024 06:39 AM - edited ‎01-06-2024 06:41 AM
@ujjwala_678
You need to adjust the script for approvals on the Menu Items of the SP Header Menu. But take caution while displaying all the approvals and try to limit to a specific number based on your requirements.