Transaction Finalizers in Salesforce Queueable Interface

public class SampleClass implements Finalizer, Queueable {public void execute( QueueableContext ctx ) {
}
public void execute( FinalizerContext ctx ) {

String parentJobId = '' + ctx.getAsyncApexJobId();
if ( ctx.getResult() == ParentJobResult.SUCCESS) {

System.debug('Parent queueable job [' + parentJobId + '] completed successfully.');

} else {

System.debug( 'Parent queueable job [' + parentJobId + '] failed due to unhandled exception: ' + ctx.getException().getMessage() );

}

}

}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store