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
Pun!5h3rPun!5h3r 

Handling detection of Record deletion

Hi,

How to detect whether a child record is deleted or not Using Visual Flows  and update its parent record using the same Flows.

Thanks in Advance
mritzimritzi
Your best bet is to use Triggers (before delete, after delete)

Process builder, Workflows, Flows won't work when records are deleted.
 
trigger nameOfTrigger on objectName(before Delete, after Delete){
	if(Trigger.isBefore && Trigger.isDelete){
		for(objectName objVar:Trigger.new){
			// your logic that should execute before deleting records
		}
	}
	else if(Trigger.isAfter && Trigger.isDelete){
		for(objectName objVar:Trigger.new){
			// your logic that should execute after deleting records
		}
	}
}

If this helps, mark it as Best Answer