
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 02:52 AM
Hi all, its probably easier to do this via roles (g_user.hasRole()) but in this instance, want to try and build this condition for my menu item by using the values of a select box on a users company field.
Table: sp_rectangle_menu_item
The field on the users company record will be: u_portal_menu_profile
Options in the select box will be: Managed, Shared, Managed + Shared
On the screenshot example above, id be looking to hide the menu item from somone who company menu profile is 'Managed'.
Is this possible via gs.getUser().getCompanyRecord();?
Thanks in advance
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 03:08 AM - edited 04-25-2024 03:09 AM
I believe I have achieved this via the following condition:
javascript;(gs.getUser().getCompanyRecord().u_portal_menu_profile=='2');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 02:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2024 03:08 AM - edited 04-25-2024 03:09 AM
I believe I have achieved this via the following condition:
javascript;(gs.getUser().getCompanyRecord().u_portal_menu_profile=='2');