UI Actions on Relationships in Related Lists

Jamsta1912
Tera Guru

Hi all,

If I have a List Banner UI Action on a related list on a form, can I specify that the UI Action is only visible for a particular relationship?

Here's an example scenario. I create a relationship between Location and Incident Task, and I add that relationship to the Location form as a related list. I create another relationship between Location and Incident Task, and I also add that relationship to the Location form as a related list. The difference between the two might be that one shows incident tasks for incidents logged against the location, the other shows incident tasks for incidents logged against the parent of the location.

I create a list banner UI Action, 'Do Something' on the incident_task table. I can specify that I only want the UI Action to show on related lists, and only where the parent table is Location, by adding the condition: RP.isRelatedList() && parent.sys_class_name == 'cmn_location'. But, that would satisfy the condition for both of my relationships. Can I make a distinction so that the UI Action only shows on one or the other, e.g. by somehow referencing the specific relationship in the condition?

Thank you

1 ACCEPTED SOLUTION

Anil Lande
Kilo Patron

Hi,

Please check below thread.

https://community.servicenow.com/community?id=community_question&sys_id=3161ce83db41e810f21f5583ca96...

 

This thread have solution for what you are looking. 

 

Thanks,
Anil Lande

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

View solution in original post

3 REPLIES 3

Anil Lande
Kilo Patron

Hi,

Please check below thread.

https://community.servicenow.com/community?id=community_question&sys_id=3161ce83db41e810f21f5583ca96...

 

This thread have solution for what you are looking. 

 

Thanks,
Anil Lande

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Thank you Anil. Yes, that is exactly what I'm after 🙂

Maik Skoddow
Tera Patron
Tera Patron

Hi @Jamsta1912 

can you please share a screenshot of the two related list? At the moment I cannot imagine that it makes sense to have both of them on one record.

Kind regards
Maik