function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vaibhab ShahVaibhab Shah 

why not with after delete trigger?

Hi,

I have 2 custom objects. One is loop up to another.
On deleting the parent record, all the associated child records need to be deleted.
I have achieved this using before delete trigger.

Just curious to know why this is not happening using after trigger?

Rgds,
Vai.
 
Best Answer chosen by Vaibhab Shah
ANUTEJANUTEJ (Salesforce Developers) 
Hi Vaibhav,

As mentioned in the below link the difference would be that you can't query the deleted records, or related child records in an after delete trigger.

>> https://salesforce.stackexchange.com/questions/288342/what-is-the-difference-between-before-delete-and-after-delete

I hope this addresses your question.

Regards,
Anutej