
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 08:25 AM
Hi,
I am wondering how to set conditional visibility around a menu item in Service Portal. Specifically, I need to make a link to the back-end (HREF/URL = /navpage.do) only visible to users who have the 'itil' role.
Does anyone know how to do that?
One other question I have is around the GlideSPScriptable.canSeePage() method - there doesn't seem to be any documentation around it - does anyone know if that method just checks the specified page's 'Roles' field to see if the user can see it or not? If that is the case, is there any similar functionality for HREF/URL menu items (since there is technically not a page to set the roles field on)?
Thanks,
Chris
Regards,
Chris Perry
Solved! Go to Solution.
- Labels:
-
Service Portal Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 08:58 AM
For your first question, have you tried setting the condition field on the Menu Item to "gs.hasRole('itil');"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2017 08:58 AM
For your first question, have you tried setting the condition field on the Menu Item to "gs.hasRole('itil');"

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2017 09:34 AM
Hi Matthew,
That worked - thanks! I have one more question and then I will mark your answer as correct - any idea why this condition code wouldn't work? The sys_id is that of a specific company record:
gs.getUser.getCompanyID()=='f52cfcf54fdd8600ac92c3fd0210c702'
Thanks,
Chris
Regards,
Chris Perry

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2017 10:07 AM
it should be
gs.getUser().getCompanyID()=='f52cfcf54fdd8600ac92c3fd0210c702'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2017 10:11 AM
Wow... silly me!! Thanks dvp!
Regards,
Chris Perry