- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 09:01 AM
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!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 03:55 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2024 12:25 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 02:10 AM
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 03:55 AM
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.