function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDC16SFDC16 

Http callouts in batch class not working

Hello Developer,

My  Http callouts in batch class not working.

But normal class working fine 
SEKAR RAJ.SEKAR RAJ.
Hi,
Use Database.AllowsCallouts in the batch class.

global class BatchSync implements Database.Batchable<sObject>, Database.AllowsCallouts {

  
global Database.QueryLocator start(Database.BatchableContext BC) {
       return Database.getQueryLocator(query);
 }
global void execute(Database.BatchableContext BC, List<Account> records) {
// Callout logic goes here
}
global void finish(Database.BatchableContext BC){

}
}

Thanks,
SEKAR RAJ