Define the payload for a custom modal
task australia Updated Sep 10, 2026 1 min read define-the-payload-for-a-custom-modal.md
Set your action button to open a custom modal by defining the payload parameters.
Before you begin
- Create a form action
- Open your record page in UIB or create a page variant in UIB
- Design your page variant in UIB
- Configure your page variant as a modal in UIB
- Create a UX add-on event mapping
Role required: admin
Procedure
-
In the navigation filter, navigate to All > Declarative Actions > Form Actions.
-
Select the form action where you want to add the custom modal.
-
Open the Specify client action field by selecting the record preview icon ([Omitted image "IconInfoTab.png"] Alt text: record preview icon) and Open Record.
-
Mark the location of your page by entering the page's action name as the route key of the Payload field.
-
Pass variables from the current context by entering the table and sysID values in the fields key.
JSON{ "route": "action-name", "fields": { "table": "{{table}}", "sysId": "{{sysId}}" } } -
Select Update.
-
Open a record in your configurable workspace.
-
Test your button by selecting it.
Your button opens the custom modal.
58 lines · 2.5 KB
---
title: Define the payload for a custom modal
description: Set your action button to open a custom modal by defining the payload parameters.
locale: en-US
canonical_url: https://www.servicenow.com/docs/r/australia/platform-user-interface/define-the-payload-for-a-custom-modal.html
release: australia
topic_type: task
last_updated: "2026-09-10"
reading_time_minutes: 1
breadcrumb: [Configure a custom form modal, Configure action buttons, Declarative actions, Administer, Configurable Workspace UI, Configure UIs and portals, Configure user experiences]
---
# Define the payload for a custom modal
Set your action button to open a custom modal by defining the payload parameters.
## Before you begin
- [Create a form action](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/create-a-new-form-action.md)
- Open your record page in UIB or [create a page variant in UIB](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/application-development/create-variant.md)
- [Design your page variant in UIB](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/design-a-page-variant-in-uib.md)
- [Configure your page variant as a modal in UIB](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/configure-a-page-variant-as-a-modal-in-uib.md)
- [Create a UX add-on event mapping](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/create-a-ux-add-on-event-mapping.md)
Role required: admin
## Procedure
1. In the navigation filter, navigate to **All** > **Declarative Actions** > **Form Actions**.
2. Select the form action where you want to add the custom modal.
3. Open the **Specify client action** field by selecting the record preview icon \(\[Omitted image "IconInfoTab.png"\] Alt text: record preview icon\) and **Open Record**.
4. Mark the location of your page by entering the page's action name as the route key of the **Payload** field.
5. Pass variables from the current context by entering the table and sysID values in the **fields** key.
```
{
"route": "action-name",
"fields": {
"table": "{{table}}",
"sysId": "{{sysId}}"
}
}
```
6. Select **Update**.
7. Open a record in your configurable workspace.
8. Test your button by selecting it.
Your button opens the custom modal.
| title | Define the payload for a custom modal |
| description | Set your action button to open a custom modal by defining the payload parameters. |
| locale | en-US |
| canonical_url | https://www.servicenow.com/docs/r/australia/platform-user-interface/define-the-payload-for-a-custom-modal.html |
| release | australia |
| topic_type | task |
| last_updated | 2026-09-10 |
| reading_time_minutes | 1 |
| breadcrumb | Configure a custom form modalConfigure action buttonsDeclarative actionsAdministerConfigurable Workspace UIConfigure UIs and portalsConfigure user experiences |