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
switi lokhandeswiti lokhande 

Two objects customer nd address both are having lookup relationship write a trigger that supports the cascade deletion proporty

AnkaiahAnkaiah (Salesforce Developers) 
Hi Switi,

Which one is parent and child?

Thanks!!
switi lokhandeswiti lokhande
Customer is child nd adress is parent
dipen joedipen joe
This course is designed for anyone new to Jira dashboards and reports, plus Jira project managers including scrum masters, Product owners, and Jira software ...https://tractorsinfo.com/onshift-login/
AnkaiahAnkaiah (Salesforce Developers) 
Hi Switi,

try with below code. Replace the object & field api names as per your org.
Trigger deleteclidrecords on address__C(before delete){

set<id> addids = new set<id>();

for(adress__C add:trigger.old){
addids.add(add.id);
}

List<customer__c> customerlistdelete = [select id from customer__c where adress__C=:addids ];

delete customerlistdelete;
}

if this helps, Please mark it as best answer.

Thanks!!