Silly Dev Trick: Apex Flex Queue with Web Callouts

More of a watch out for this but when using Apex Flex Queue with classes that do web callouts you have to add ‘Database.AllowsCallouts’ to your queueable class like so:

public class ExampleQueueableClass implements Queueable, Database.AllowsCallouts{

This got me but after the usual hunt and peck the googles answered the call:

This is the error the console throws that is confusing:

Callout not allowed from this future method. Please enable callout by annotating the future method. eg: @Future(callout=true)


Leave a Reply

Your email address will not be published. Required fields are marked *