How to disable UI Action in Related List
This content was last updated in 2018. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- 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 02:17 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2014 02:32 AM
Thank you,
though I would like to omit the UI Action when a the particular condition is reached, namely Budget Sottomesso is equal to 'Si'. With your method I am disabling the UI Action forever (the field Budget Sottomesso has the text in blu in the screnshot).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2014 02:48 AM
Hi Lorenzo,
Since I see only one related list in your screenshot, you can put the below code in an onLoad client script on the main table to achieve this:-
function onLoad() {
var val=g_form.getValue('u_budget_sottomesso');// pls check the column name for this field, I just guessed it
if(val=='Si'){
document.getElementById("sysverb_new").style.display='none';
}
}
Thanks & Regards,
Hari
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-09-2014 03:34 AM
No way to do it through Service Now without writing a script? Just to know ...