I have 4 custom objects which has master-detail relationship with each other.
Obj A (Parent)
Obj B (Child of Obj A)
Obj C (Child of Obj B)
Obj D (Child of Obj C)
So if I delete Obj A , all the child records of these objects has to be deleted. But I face an issue when I try to delete an Obj A record which has large number of child records.The error is "Delete failed. First exception on row 0 with id "Id of the record"; first error: DELETE_OPERATION_TOO_LARGE, Cascade deleting too many records: occurring when cascading to Obj D records: "
I tried to empty the recycle bin by calling Database.emptyRecycleBin(List ObjArecords) after deleting but still the above error occurs.
Is there any way to rectify this issue.? How will I delete all these records?