- 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-07-2024 03:30 AM
Hello @Narsing1 ,
Thank you so much for your efforts on this.....The shared logic is working as expected for me
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2024 03:39 AM
Hi @ujjwala_678
You mean Approval option is not visible? If yes, then it will show only to user if the approval is pending from that user.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2024 03:43 AM
Hi @Dr Atul G- LNG ,
Thank you for your response on this....No the issue is despite adding the 'approvals' menu item, it is not reflecting on portal view..I think it is the angular-ng menu template which is reflecting the menu items
Thank you,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2024 03:56 AM
Hi @ujjwala_678
Are you trying on SP or ESC?
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2024 06:28 AM
Hello @Dr Atul G- LNG
I am trying on service portal.../sp
OOB approvals header will appear only when you have approvals pending
I want it should be visible all the time....even if the users don't have any approvals pending from their end they should be able to see approvals header menu
Thank you