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
abhik dey 1abhik dey 1 

Delete related object records connected through look up realtionship

I have a lookup relationship with a custom object to standard lead object. I wanted to delete the custom object records when the related lead record got deleted from the system.
I wanted to know apart from writing a logic in trigger , is their any other possible ways through which I can achieve this functioanlity ?
Any Ideas ?
Nikhil Verma 6Nikhil Verma 6
Hi Abhik,
You can use a combination of Process Builder + Flow to achieve this. You can use the Record Delete or the Fast Delete element in the flows to achieve this.
Hope this helps.
abhik dey 1abhik dey 1
Thanks but I dont see delete event to capture in process builder. In flow i can do record delete....But to trigger the flow i have to invoke it from process builder . But Now how to invoke process builder while record is deleted, there were two options in process builder 1. A record changes 2. Invoked by other process