How to hide all the related links in a view?

dini1
Tera Contributor

I have 3 related links in a form. When in a particular view, I would like to hide all the related links.

I also see Update & Save buttons in the view. Do I need to go to the UI Actions of Update & Save and set the condition not to be visible when in a view? Can someone plz help me in this?

1 ACCEPTED SOLUTION

Hi,


There are 2 ways to do it. One is to go to the relevant UI action and scroll down to the bottom. You will see 'UI Action Visibility'. Add your view and choose 'Exclude' if you dont want to have the UI Action visible in the view.


The other way is to add in the condition of a UI Action, as below


var uri = gs.action.getGlideURI();uri.get('sysparm_view') != 'general' //Here I dont want to see the UI Action (Related links) in general view



In your case, I dont think you can disable all the links in a single shot. You have to go the each UI Actions and use one of the way I mentioned above to hide the link in a view. yes, you need to go to Update and Save UI Actions to not to use in a view.


View solution in original post

3 REPLIES 3

bernyalvarado
Mega Sage

Hi Dinesh,



The UI action can be made visible based on the view form is on.



You can follow the following instructions in the wiki:


http://wiki.servicenow.com/index.php?title=UI_Actions#Controlling_Visibility_with_Views&gsc.tab=0



Thanks,


Berny


Hi,


There are 2 ways to do it. One is to go to the relevant UI action and scroll down to the bottom. You will see 'UI Action Visibility'. Add your view and choose 'Exclude' if you dont want to have the UI Action visible in the view.


The other way is to add in the condition of a UI Action, as below


var uri = gs.action.getGlideURI();uri.get('sysparm_view') != 'general' //Here I dont want to see the UI Action (Related links) in general view



In your case, I dont think you can disable all the links in a single shot. You have to go the each UI Actions and use one of the way I mentioned above to hide the link in a view. yes, you need to go to Update and Save UI Actions to not to use in a view.


dini1
Tera Contributor

Both the ways worked like charm. Thanks for your help.