Salesforce Certified Platform Developer II — Question 90

A developer is working on code that requires a call to an external web service from a batch.
How should the developer enable this functionality?

Answer options

Correct answer: B

Explanation

The correct answer is B because including Database.AllowCallout() in the class definition permits the batch job to make callouts to external web services. Options A and C are incorrect since they do not directly enable callouts in a batch context, and option D is not a valid syntax for enabling callouts in batch classes.