- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2019 09:50 AM
Hello,
I want to hide the "Export" Option in the UI context menu for table "sys_user" and want to keep it for admin users only. I know the option of Export exists user System UI-> UI context Menu , but what condition can I put there so that it is only applied to the sys_user tbale and only the Export option is available to only admin in the user table ?
Please help
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- 3,547 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2019 11:00 AM
You can open Context Menu [sys_ui_context_menu] table in menu System UI > UI Context Menus, filter by Name equal to Export and open the definition of Export menu.
By default the Condition of Export menu is
!ListProperties.isRelatedList() && !ListProperties.isRefList()
I suggest you to change the condition to
!ListProperties.isRelatedList() && !ListProperties.isRefList() && (ListProperties.getTable() != "sys_user" || gs.hasRole("admin"))
You should receive results, which you need: "Export" menu will be displayed in Users table only for admins. Other tables will hold "Export" menu.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2021 01:52 PM
Hi Oleg,
Could you please let me know how to include three custom tables in the condition to hide Export option? Condition field has limited string length and I cannot include more than one table. Is there a way other than including in condition field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2023 10:51 AM
@Oleg Hello i want to write a condition like this but my condition is too long for the condition field what shoud i do please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2023 01:33 AM
@yoli1 You can create new Script Include, which contains full condition and replace the original condition (!ListProperties.isRelatedList() && !ListProperties.isRefList()) to the call of your script include method (like new MyConditionClass().myMethod(ListProperties)).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2023 05:02 AM
Hi @Oleg Thank you! quick question what does the condition : !ListProperties.isRelatedList() && !ListProperties.isRefList() mean i'm not sure i understand it very well Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2023 05:17 AM
Hi @yoli1
The methods of ListProperties are not documented, but one can easy guess the meaning or to find some non-official references like this one with the following description:
- !ListProperties.isRelatedList() part of the condition prevents this action from showing on up related lists.
- !ListProperties.isRefList() part of the condition prevents this action from showing up on reference list popups.