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

How to Create Object at Salesforce Classic

Order of execution in Triggers

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