Hide and show UI action based on view

nehasingh98
Tera Contributor

How can we hide and show ui action? i want to hide it for abc view and display for others view.

1 ACCEPTED SOLUTION

Runjay Patel
Giga Sage

Hi @nehasingh98 ,

 

Yes you can achieve it using configuration.

Go to your ui action and scroll down to related list called "Ui Action Visibility".

Click on edit button and select your view and disallow.

RunjayPatel_0-1735300313447.png

 

-------------------------------------------------------------------------

If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.


Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay

-------------------------------------------------------------------------

 

View solution in original post

5 REPLIES 5

JenniferRah
Mega Sage

This is already solved, but another option is to use getViewName() in the condition of the UI Action. The link below is to the developer documentation on it. Maybe it will help others searching this topic.

 

https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/server_legacy/RenderProperties-...