Related List Declarative Action to create child record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I have a requirement where I need to create a button in related list of Case table, when button is clicked it should display list of all Stores (another table) and when user selects multiple/single record and clicks on ADD it should create child records in Case for each Store selected. I am able to create the button using related list Declarative Actions, i was also able to invoke the list Modal by using OOB 'Related List MRA'(although it is in different scope, but it worked). Now when I click on ADD in list Modal, it doesn't create records in Case table. Please assist on how to get this working.
Any help would be appreciated.
Thanks
Lakshmi P
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hi Lakshmi,
OOB Related List MRA associates with existing related records, not for selecting records from one table and generating brand new records in another table.
In your requirement, the user is selecting Store records, and on Add you want ServiceNow to create child Case records for each selected Store. That is not the standard OOB MRA behavior.
Use modal as picker, then write custom server-side logic to create child case for each selected record.
1. Create client callable script include to write logic for creating child cases.
2. Call this script include from your UI Action/ Modal. Pass case sys ID as the parameter.
This server-side code will create child case per selected store.
Please try with above approach. Let me know if this works.
If my solution helped, please mark this as helpful and accept the solution.
Best Regards,
Diksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @lakshmipate ,
Does the proposed solution helped?
If my solution helped, please mark this as helpful and accept the solution.
Regards,
Diksha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Could you please share screenshots supporting your comment so that it would be helpful?
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
