- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 05:03 AM
Hi everyone!
How do I add a custom button to a specific related list?
What I mean is the following - Watch the image bellow:
How do I add a custom button beside the New and Edit button?
The UI action I have is:
How do I achieve this feature?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 08:29 AM
Hi
I based myself on this: https://www.servicenow.com/community/developer-forum/get-sys-id-of-current-incident-record-in-list-b... and it worked!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 05:08 AM
HI,
Put the below in your condition
RP.isRelatedList()
And Check the box that says 'List banner button'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 05:13 AM
Hi @Anurag Tripathi ,
The selection of the checkbox makes it appear, but it is in the wrong related list.
1º How do I make it appear in the correct Related list
2º When I click the button it appears "No records selected". The action I have works perfectly because I tested it when I "check" the option "Form button" and with that button it works. Why doesn't it work in the related list?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 05:16 AM - edited 05-21-2024 05:18 AM
For your second point, You may have to create a new button for that. A button which is suppose dto work on form will not work on related list as is.
For your first point You can add that also in the condition of the new ui action, something like below
RP.isRelatedList() && current.getTableName() =='table name of related list table' && parent.getTableName()=='table name of the parent where you add this related list'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2024 08:29 AM
Hi
I based myself on this: https://www.servicenow.com/community/developer-forum/get-sys-id-of-current-incident-record-in-list-b... and it worked!