You need to sign in to do that
Don't have an account?
vinni1
URJ: Deleted contact records capture into another object
Hi All,
I have 3 objects account,contact and DummyContact . account and cotact have Master detail relation ship..
My Req is capure the deleted contact records under Account in to DumayContact object
please help for this
trigger DuplicateContact on Contact (after delete)
{
set<id> allacc = new set<id>();
for(contact allcon:trigger.old)
{
allacc.add(allcon.id);
system.debug('old====>'+allacc);
}
list<contact> allconss = [select id,name,accountid from contact where accountid=:allacc];
List<DummyObject__c> dummyContacts = new List<DummyObject__c>();
for(Contact c : Trigger.Old) {
dummyContacts.add(new DummyContact__c(Account__c = c.AccountId));
}