How to disable UI Action in Related List
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2014 02:09 AM
Hi,
I would like to disable the UI Action 'New' on a Related List when a particular field of the main table has a specific value.
Have a look at the screenshot below here (in red the Ui Action).
I have a table 'Budget' with a related List of 'Budget Item' (or cost items) and I would like to disable the UI Action 'New' when the field Budget Sottomesso is equal to 'Si', namely the budget has been submitted.
Thank you,
Lorenzo
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2014 04:13 AM
I am facing the same issue while trying to hide context menu for non admins
I figured the below code some how work but gives stack overflow error
function onLoad() {
//Disable the context menu for non-admins
if(!g_user.hasRole('admin')){
//Disable all form section header context menus
$$('form')[0].select('tr.header').each(function(elmt) {
Event.observe(elmt, 'contextmenu', clearMenus());
});
}
}
How should i move forward??
Thanks in advance for your help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2014 04:00 AM
Hi Ayush,
Why do you have to write a client script ?
Instead go to that particular UI Action and in the condition field give gs.getUser().hasRole('admin') , so that only for users having admin role the context menu will be visible.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-11-2014 03:13 AM
Hi Vibha,
I managed to hide save option from context menu but unfortunately ain't managed to find any UI context or context menu for assign tag,reload,templates etc. Hence i opted this as a option

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2014 05:12 AM
Hi Lorenzo,
Try creating a new UI Action as "New" specific to your table but with same name, same sysverb_name as the global one.
This should only show the newly created "New" UI Action on your table, but will not affect the Global UI Action "New".
Thanks,
Mandar

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-10-2014 02:39 AM
Any suggestions on below issue:-
function onLoad() {
//Disable the context menu for non-admins
if(!g_user.hasRole('admin')){
//Disable all form section header context menus
$$('form')[0].select('tr.header').each(function(elmt) {
Event.observe(elmt, 'contextmenu', clearMenus());
});
}
}
"I am facing the same issue while trying to hide context menu for non admins
I figured the below code some how work but gives stack overflow error"