>Hi Fred:
>
>Yes that's the correct scenario. But the records haven't been deleted, I've checked after every test in the database tables, only the parent record gets deleted.
Try reversing these two lines:
dele all for gidetail.sessionkey = csessionkey
replace all gidetail.lc_action with "D"
Change to:
replace all gidetail.lc_action with "D"
dele all for gidetail.sessionkey = csessionkey