Undelete Trigger on Case

Undelete Trigger on Case


Undelete Trigger Class:


trigger unDeleteCase on Case (after undelete) {

    if( trigger.isundelete){
      list<Case> casesUnDeletedList = new list<Case>();
      casesUnDeletedList = [SELECT id,After_Undelete__c FROM Case
                                                WHERE Id IN :trigger.newmap.keyset()];
  
      for(Case c :casesUnDeletedList) {
        c.After_Undelete__c = true;
      }
      
      update casesUnDeleted;

    }

}




*** Trigger Most Common Interview Questions and Answers for MNCs and Small-Mid Companies ***

Visualforce Most Common Interview Questions and Answers for MNCs and Small-Mid Companies ⇒ *** Comming Soon ***

Apex Most Common Interview Questions and Answers for MNCs and Small-Mid Companies ⇒ *** Comming Soon ***

Lightning Component Most Common Interview Questions and Answers for MNCs and Small-Mid Companies ⇒ *** Comming Soon ***

Lightning Design System Most Common Interview Questions and Answers for MNCs and Small-Mid Companies ⇒ *** Comming Soon ***

Freelancing Services At Salesforce: Freelancing Services

For Job Support click this URL: Job Support

Comments

Popular posts from this blog

Trigger Update Contact record using trigger when account record is updated

If you looking for Salesforce Certified Freelancer for you Salesforce org works feel free to contact us, details are in below:

Context variables in triggers