How do I create a custom button in the related List of the form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 02:23 AM
Hi all
How can i create a custom button in the related List beside the new/edit button , can any one help me with that.
so i here marked with red box , i need to create a button.
Thanks,
Naidile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 02:33 AM
Hi @NAIDILE S ,
You can create a UI action for this table, select the list button checkbox and the condition would be:
RP.isRelatedList()
Add more conditions based on the requirement, the button will be displayed beside 'Edit'
If my answer has helped with your quesiton, please mark it as helpful!
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 02:35 AM
May i know what is that RP. please
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 02:46 AM
RP stand for RenderProperties, it is an API which provides methods about the current page and is available in Jelly scripts and in UI-action conditions and scripts.
It has multiple methods such as : isRelatedList(), isManytoMany() and more..
Please refer to this doc: https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server_legacy/RenderProperites-API#RP-...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 02:36 AM
Hi,
Here are the steps you can follow:
Go to the related list where you want to add the button.
Click on the gear icon at the top right of the related list and select "Configure".
In the "Related List" form, scroll down to the "Buttons" related list.
Click on "New" to create a new button record.
Fill in the fields for the new button. Here are some key fields to consider:
- Name: The name of the button that will be displayed on the related list.
- Action name: The name of the client-side script function that will be called when the button is clicked.
- Table: The table that the client-side script will operate on.
- Condition: A script that defines when the button should be visible. If you leave this field blank, the button will always be visible.
Save the button record.
Once you have saved the new button record, it should appear in the "Buttons" related list in the "Related List" form. You may need to refresh the page to see the button appear in the related list.
Note that the client-side script function that you define in the "Action name" field will need to be implemented in a UI script or client script that is accessible to the users who will be clicking the button. You may also want to consider setting appropriate security controls to limit who can access the button and what actions it can perform.
Thanks,
Rahul Kumar
Thanks,
Rahul Kumar