Last active
February 9, 2020 18:58
-
-
Save dhaniksahni/523db42bdc45b018e9409bdb42e47d64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UpdateCaseQueuable implements Queueable { | |
public List<Case> caseList ; | |
public UpdateCaseQueuable(List<Case> cases){ | |
this.caseList = cases ; | |
} | |
public void execute(QueueableContext context) { | |
for(Case a :caseList){ | |
a.Description ='Updated from UpdateCaseQueuable'; | |
a.Status='Closed'; | |
} | |
update caseList; | |
//Finalizer class | |
SendEmailFinalizer emailFinalizer = new SendEmailFinalizer(); | |
System.attachFinalizer(emailFinalizer); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment