Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Related List Declarative Action to create child record

lakshmipate
Tera Contributor

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

 

 

 

3 REPLIES 3

Diksha_Tiwari 1
Tera Contributor

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

Diksha_Tiwari 1
Tera Contributor

Hi @lakshmipate ,

Does the proposed solution helped?

 

If my solution helped, please mark this as helpful and accept the solution.

 

Regards,

Diksha

 

@Diksha_Tiwari 1 

Could you please share screenshots supporting your comment so that it would be helpful?

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader