We've updated the ServiceNow Community Code of Conduct, adding guidelines around AI usage, professionalism, and content violations. Read more

Add a button on Incident Related List in service operation workspace

Ssinha4
Tera Contributor

Hi,

I have to create a Add button for cases related list on incident record in SoW. I followed few of the articles from community.

https://www.servicenow.com/community/next-experience-articles/introduction-to-declarative-actions/ta...

 

https://www.servicenow.com/community/next-experience-forum/how-to-add-records-in-a-related-list-with...

 

'Add Case' Button gets added but onclick is not working. the model window is not opening. Please find my steps below and let me know if i am missing something.

1. Created a related list action assignment.

img1.pngimg2.png

 

2. Create Action payload

img3.png

 

 

3. Create UX Add-on Event Mapping in Action Assignment

img4.png

Based on below article i have also created a UX App Route for this one.

 

https://www.servicenow.com/community/next-experience-forum/how-to-add-records-in-a-related-list-with...

 

Version - Yokohama/Zurich

Cleared the cache too. But model is not working.

Kindly help,

 

Thanks in advance

1 REPLY 1

HaimNizri
Tera Contributor

The modal not opening usually means the UX App Route isn't configured correctly or there's a mismatch between your action payload and route definition.

Check these specific things:

**Route Table (sys_ux_app_route)**
- Make sure your route_url matches exactly what you're passing in the action payload
- The table field should point to your target table (sn_customerservice_case)
- Check that view and form are set correctly

**Action Payload**
Your payload should look something like:
```javascript
{
"route": "your_route_name",
"fields": {
"parent": "{incident_sys_id}",
"caller_id": "{caller_id_value}"
},
"table": "sn_customerservice_case"
}
```

**Common gotchas:**
- The route name in your payload must match the Name field in sys_ux_app_route (not the Route URL)
- If you're pre-populating fields, make sure the field names exist on the target table
- The UX Add-on Event Mapping should have event type "navigate" for modal opens

Try opening browser dev tools and check the Network tab when you click the button. If you see a 404 on the route call, that confirms the route mapping issue.

What does your current action payload look like? That'll help narrow down where the disconnect is.

**If you find my answer useful, please mark it as Helpful and Correct. 😊**