- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023 08:24 AM
Hello,
I need to hide a submenu in a Portal for users who doesn't meet some conditions.
I wrote a condition in my Menu item, but it doesn't work: "gs.getUser().getRecord().u_retail_staff == true || gs.getUser().getRecord().u_target_si == 100"
Does anybody can help me?
Best regards,
Elena
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023 12:39 PM
Hi @Elena7 ,
As per my understanding getRecord() will only work for the sys_user table existing fields, since you are trying it with custom fields it is not getting executed. So You can create one Script Include and call the Script Include in the condition. Please find the below example.
Step 1:- Create a custom field called Vendor and Request menu Item Should only be visible to the users who are having this vendor check box as true.
Step 2:- Created a script Include.
Code:-
Step 4:- Add a Menu Item Condition
Code:-
new GetVendorValue().ReturnVendorValue()
Please mark my answer as helpful and accept it as a solution, if it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2023 12:39 PM
Hi @Elena7 ,
As per my understanding getRecord() will only work for the sys_user table existing fields, since you are trying it with custom fields it is not getting executed. So You can create one Script Include and call the Script Include in the condition. Please find the below example.
Step 1:- Create a custom field called Vendor and Request menu Item Should only be visible to the users who are having this vendor check box as true.
Step 2:- Created a script Include.
Code:-
Step 4:- Add a Menu Item Condition
Code:-
new GetVendorValue().ReturnVendorValue()
Please mark my answer as helpful and accept it as a solution, if it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2023 04:09 AM