Hi
If ur invoice header is the owner of the invoice detail, then in the header object... MyDetailID.. Use the delete function. That will auto delete the detail trx.. If u delete the header trx..the detail also deleted too.
However, if u use the peer as link the two table.. The u need to write the rule on delete rule section.
Find invoice_detail where invoice_detail.myheaderid =invoice_header.mydetailid
Delete invoice_detail
Hope it help...thks.