You need to sign in to do that
Don't have an account?
Mehmet_Ergun
after trigger query
If you delete a parent record, all lookup-children are orphaned. (Not master-details).
The lookup field to the parent from the child is simply nulled out.
So if you wanted to run a query that retreived the records orphaned from that particular parental delete, and you wanted to do it only in an after-delete trigger (not before), how would you do it?
I think that you should be able to use the "old" trigger context variable.
find the IDs of the children through the deleted master
maybe something like:
theChildren.addall(master.children__r)
I was hoping someone might see something I've missed and there is another way to pick up the deleted parent ids on orphaned children.