How to implement cascade delete?

I would like to know how I can delete a parent record with multiple child records by one button action.
In my app I have a main screen with some fields and a list of child detail records. I would like to delete the main record by clicking the button bottom of the screen. When the main record is deleted all the child records should be deleted accordingly. Is it possible to implement this ?

This is very easy.
The trick is to put the action on a Screen and NOT on button/form.

Screen 1 with Parent Record List on tap of the list it goes to a screen
Screen 2 Parent record info, now add the delete button here and link it to a blank page
Screen 3 On this blank Screen , add as much as actions you need. One action per child record.

*It is important that you are choosing the Current record mate…

2 Likes

Thanks TORCH,

But I’m still struggling… When I try to add action on the blank screen (which contains current parent reference) I only can delete parent and user(created by) not child records. I cannot see child collection (current parent > child) from options for action on visit the screen.
Could you tell me about relationship between parent and child on your example ?
In my case Parent:Child is 1:n, not n:n relationship.

Many thanks,
Ryosuke Sato

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.