How do I add List banner button from a UI action to a specific Related list?

rafas_2703
Tera Guru

Hi all,

 

I want to add a button to a specific related list, but for example, I want to add a button to a related list called "Child cases". That related list is getting values from the sn_hr_core_case table but it's not the only one, so my button is appearing for different related lists.

 

How can I make it appear only on my desired related list?

 

Thank you!

1 ACCEPTED SOLUTION

Hi,

The "parent" doesn't refer to whether the record is a parent or not. It's an object provided to the condition field to refer to the form the related list is on. 

For example, if the form is an incident form, the condition field would have access to an object called "parent" which allows you to access information from the incident form.

View solution in original post

3 REPLIES 3

Kieran Anson
Kilo Patron

One option is to use the scripted condition on the ui action to filter the visibility as follows

RP.isRelatedList() && parent.active == true && parent.canWrite() && (parent.getTableName() == "sn_customerservice_case") 

This example will only show the UI action if it's being shown on a related list, the parent record is active, the current user can write to the parent record, and the parent record is a case record.

 

Hi @Kieran Anson ,

Thank you for your help!

 

The issue I think it won't work is because I want the button to appear without the case being a parent first!

The button will be to create a child case, so the case won't be a parent until I click the button.

 

Any other ideia?

Hi,

The "parent" doesn't refer to whether the record is a parent or not. It's an object provided to the condition field to refer to the form the related list is on. 

For example, if the form is an incident form, the condition field would have access to an object called "parent" which allows you to access information from the incident form.