Condition on service portal menu item

M_iA
Kilo Sage

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.

 

M_iA_0-1714038480619.png

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

1 ACCEPTED SOLUTION

M_iA
Kilo Sage

I believe I have achieved this via the following condition:

 

javascript;(gs.getUser().getCompanyRecord().u_portal_menu_profile=='2');

View solution in original post

2 REPLIES 2

M_iA
Kilo Sage

I believe I have achieved this via the following condition:

 

javascript;(gs.getUser().getCompanyRecord().u_portal_menu_profile=='2');