Hello! I am creating a case desk for our org. Many of our cases have attachments and child cases, so one thing I’m doing is creating a table of “Parent” cases with drawers that open to a list of child cases and related attachments. I would also like to offer users the option to add an attachment or create a new child case from inside the drawer, so that they don’t have to open each parent case record to do this. 
The way I’ve set this up is: I created a model called Cases for all of my parent cases, a model called CaseDetails for the drawer, and models called CaseDetailAttachments and CaseDetailChildCases for the related lists inside the drawer. I configured the filters, before load actions, and context per the documentation here. Page Not Found — Skuid v15.1.6 Documentation So far, the load is working beautifully – meaning when I open a drawer or multiple drawers, the correct list of attachments and related cases shows up. However, the issue I’m running into is with the Create New Case and Attach File buttons. Basically, if I open two drawers and upload a file or create a new case on the second drawer, the file/case gets associated to the wrong case (basically, to the first case whose drawer I opened). Attach File: This is a file upload button, where I’m attaching a file to the CaseDetails model. I’m guessing the issue is that it’s saving to the first row of the CaseDetails model; since the drawer model queries Get More, the second drawer I open is the second row in the model, so it doesn’t save to that record. Create New Case: This is a page title button that opens a popup. The model that I’m creating a new case on is a separate model (NewCase). The pop-up has a Submit Case button – a page title button on the CaseDetails where one of the pre-save actions is Update ParentId of NewCase model to Id of the CaseDetails model. Again, I’m guessing the issue is that it’s pulling the Id of the first row of the CaseDetails model, so it doesn’t save to the second record I open a drawer for.
Does anyone have ideas for how to get these record creations to work as I’m hoping they’ll work? So sorry for the long post, but please do let me know if you have any thoughts about this. Thanks for your help! Regards, Aparna
Question
Creating Related Records within Drawers
This topic has been closed for replies.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
Page Include Component Configuration: 