How to Hide UI Action Button on the basis of View?

kushalt1
Kilo Contributor

How can we show/hide any button i.e UI Action depending on the form View?

7 REPLIES 7

Rajesh Mushke
Mega Sage
Mega Sage

Hello Tiwari,



Please Refer :



https://www.servicenowguru.com/scripting/client-scripts-scripting/removing-form-buttons/



Form buttons and context menus are usually a desirable piece of functionality to include on your form. I have seen scenarios before however, where I needed to limit the options available to a user so that they could really only perform one action. The first options that I would consider in these situations is to simply modify the 'Condition' field (for role-specific or other criteria) or the 'UI Action Visibility' related list (for view-specific criteria) on the particular UI action that I wanted to remove from the user's view. This is obviously the best and simplest method since it falls in line with the design of the product and doesn't really require any unusual override of other system behavior.



https://www.servicenowguru.com/wp-content/uploads/2010/04/RemoveButtons-RolesView.jpg




How to hide/show an UI action on field changes




Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke

FINALLY someone shows a simple OOB solution for UI Action Visibility. I've googled for so long only to find everyone writing scripts to show/hide on specific views. Thank you for this!

gauravchoudhury
Tera Guru

Hi Kushal,



Try this blog link for your reference. Also, there is a resolved thread which may help you with your query.


Anil74
Tera Guru

Hi Kushal,



Please refer this link, might be helpful.



Hiding UI action button from ESS