Hide Menu Items on ESC Header Menu for snc_external role

amielalcala
Kilo Sage

Hi,

 

The client wants to hide My Requests, Favorites, Profile Dropdown, and Tours from the ESC Portal header from snc_external users. I checked the header menu items to try and add conditions but I don't see it there. Is there any other way to hide these for users with snc_external role?

 

amielalcala_1-1706699564604.png

 

Appreciate any help I can get. Thanks!

1 ACCEPTED SOLUTION

amielalcala
Kilo Sage

This might help someone out there - I was able to find a workaround by adding snc_external role on 'Cannot View' in the pages with the help of Service Portal User Criteria plugin. The header items are still there but once clicked, it's not accessible by external users.

View solution in original post

7 REPLIES 7

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @amielalcala 

 

https://www.servicenow.com/community/developer-forum/hiding-menu-items-for-sp-header-in-service-port...

 

https://www.servicenow.com/community/developer-forum/how-to-hide-show-service-portal-menus-based-on-...

 

https://www.servicenow.com/community/developer-forum/hide-portal-header-menu-items/m-p/1562217

 

*************************************************************************************************************
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]

****************************************************************************************************************

Hi @Dr Atul G- LNG,

 

I checked on the portal menus but unfortunately, I don't see the ones I have mentioned. This is the only one I see. Do I need to modify something on the menu server script?

 

amielalcala_0-1706702317592.png

 

See my comment:

"Note that these are also in fact not menu items. That also makes that the response from Atul is incorrect."

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Hi @Mark Roethof,

 

Oh, thanks for pointing that out! If that's the case, shall I add a condition on the header server script? I tried adding a condition but when I impersonate snc_external, it still shows up. Here's the condition I added:

    data.user_role = gs.getUser().hasRole("sys_user_role");

	if (
		data.user_role == '940ba702933002009c8579b4f47ffbe2'

	) {
		data.adminHeader = false;

	} else {
		data.adminHeader = true;
	}