You need to sign in to do that
Don't have an account?
Suman Bonthala
how to post
trigger trgcpundelete on Opportunity(after undelete)
{
set<id>oppid= new set<id>();
if(trigger.isafter&&trigger.isundelete)
{
FOR(Opportunity o : trigger.new)
{
oppid.add(o.id);
}
}
list <Customer_Project__c> cplist = [select id,name,Opp_relation__c from Customer_Project__c where isdeleted=true and Opp_relation__c IN:oppid];
undelete cplist;
}
{
set<id>oppid= new set<id>();
if(trigger.isafter&&trigger.isundelete)
{
FOR(Opportunity o : trigger.new)
{
oppid.add(o.id);
}
}
list <Customer_Project__c> cplist = [select id,name,Opp_relation__c from Customer_Project__c where isdeleted=true and Opp_relation__c IN:oppid];
undelete cplist;
}
Can you explain your requirement more??
Thanks & Regards,
Abhishek Singh.
Abhishek Singh,
thanks for your resonse my requirement is whenever i undelete opportunity its related customer projects also undeleted