Working on a future method to post values to external web service. But since there is a limit of 50 callouts per invocation, I am getting error "Too many future calls : 51". Cases are loaded into salesforce from external ETL in bulk. So is there a way to workaround this error.
Class
public with sharing class caseTrigger {
//method invoked by trigger after insert
public void CaseInsert(List<Case> caseIns){
list<Id> caseIds = new list<id>();
List<Case> caseList = [Select id from case WHERE Id IN :caseIds];
for(Case c : caseList){
if(c.Status != 'closed'){
caseIds.add(c.id);
}
if(f.caseId_User.size()>0){PostCases(caseIds);}
}
//postCases (future method)
@future(callout = true)
public static void PostCases(List<Id> Ids){
//prepare Json to post to webservice
}
}