Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

How to get the related list for a UI action condition

Nagasri
Tera Expert

There is a UI action which is on the two related list as they are on the same table. How to restrict it to one related list in serviceNow. We trying to get the related list name on the condition of the UI action

4 REPLIES 4

Sandeep Rajput
Tera Patron

Nagasri
Tera Expert

Hi @Sandeep Rajput ,

 

I should add that in UI action condition, I need to restrict visibility based on related list name, the script you have mentioned is used for client side

Marinela G
Tera Guru

Add in the UI Action condition the following code

 

&& !RP.getListControl().label.equals('Incidents Fixed By Change')

 

And replace the 'Incidents Fixed By Change'' with the name of the related list on which you DO NOT want the button to be shown. 

This was exactly what I was looking for. Thank you!