You need to sign in to do that
Don't have an account?
Lithium SFDC
Calling future method from Trigger which is invoked from a Batch
I have a use case as below:
1. On case insert/update we need to call an API.
Approach I have taken is: I wrote a future method to call API and called the future method in trigger.
Issue: Now our client wants to insert/update cases from batche job which results in error as future method can not be called from Batch.
Alternate I tried is queuable class but that again has a limitation of max 1 call from batch.
Any suggestion how to solve the above problem.
1. On case insert/update we need to call an API.
Approach I have taken is: I wrote a future method to call API and called the future method in trigger.
Issue: Now our client wants to insert/update cases from batche job which results in error as future method can not be called from Batch.
Alternate I tried is queuable class but that again has a limitation of max 1 call from batch.
Any suggestion how to solve the above problem.
For each iteration of execute() in the batch ie., For each "batch", we can call up to 10 HTTP callouts.
So, Try to modify or Bulkify the API Call and modify the Batch Size accordingly.
That may solve the issue.
Let me know, if it works
Best,
Nithesh.
Is this Acceptable ??
please let me know if you found any solutions.