How to delete children records?
Posted: Thu Apr 11, 2019 6:42 pm
I have a form with relationships. I need the ability to selectively delete the children. I get the child in a record I want to delete. But the deleteRecord(rec) deletes all the children and the parent record in another table.
Can someone tell me why this is deleting Parent and children? And how to delete just the selected child?
- Code: Select all
function onAction(event) {
// Delete selected image record.
var rec = forms.frm_MOD_fsr_image_pict_Edit.foundset.getRecord(1);
application.output("Rec id = " + rec.fsr_image_id);
forms.frm_MOD_fsr_image_pict_Edit.foundset.deleteRecord(rec);
}
Can someone tell me why this is deleting Parent and children? And how to delete just the selected child?