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() );

}

}

}

--

--

--

Technical Blogger, Software Engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Burp Suite Tips — Volume 1

Tips to Ease Cloud Application Development

Identifying Synchronous and Asynchronous code and Repeating Phase Two [update]

What does it take to start Coding?

Xcode Advanced Tips Part 1 / 2

Xcode_welcome

Which CPU should you buy? | Buying guide

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
InfallibleTechie

InfallibleTechie

Technical Blogger, Software Engineer

More from Medium

Office Features Toll-Free Numbers

NostraCapital Review 2021 — Why I Stick With This Broker?

Public Servants Deserve a Hug, Not a Swift Kick

What would Super Mario do? Leveraging gamification at your virtual and hybrid event