child resource as a dialog on click of a custom action button?

Time & again, I am coming across this pattern as a requirement and not able to solve it. I want to give a custom action button per record in the resource list view to pop open a dialog to add a new child record associated with this parent record. E.g. we have a support ticket system. It has a ticket resource which lists all the tickets. Next to each ticket row, I want a custom action to add "add comments" to the ticket about its progress. Ideally, it should pop open a dialog and have fields to capture comments and user who is adding this update/comment for that ticketID. I don't want to click on the ticket to view the ticket and it's comments relationship (via relationship manager) and then click on add in the relationship to add a new comment! How do we achieve this pattern? Is there any code reference where this is done for my reference? Maybe this pattern should be documented because I feel others too would be facing this requirement. Thanks.
2 Replies
code jam
code jamOP6mo ago
Thank you for your response. Yes. I did read about this modal option. But unfortunately, I have many more fields in this comment model other than just the comments text. So, we will end up duplicating the form and actions of the child resource i.e. the comment model. I was looking for a way to instantiate the CommentResource create capability by associating it with the custom action button (like how we would click on the "New Comments" button in the CommentResource list view - open createview ).
Want results from more Discord servers?
Add your server