You need to sign in to do that
Don't have an account?

Apex Queueable
Hi Friends,
We have a requirement like, Batch job updates the Opportunity field if the field is changed then we need to send the information to third party system. It might be bulk records.
I am trying to write the future call from Opportunity trigger after update event. but getting the error we can't call the future method from batch job. will it come under the batch job transaction?
So i am planning to write the apex queueable, but the apex queueable also we can call one time in the batch job transaction. if we get more records then how to split the records and send it third party system.
Please suggest on this.
Thanks,
Krish
We have a requirement like, Batch job updates the Opportunity field if the field is changed then we need to send the information to third party system. It might be bulk records.
I am trying to write the future call from Opportunity trigger after update event. but getting the error we can't call the future method from batch job. will it come under the batch job transaction?
So i am planning to write the apex queueable, but the apex queueable also we can call one time in the batch job transaction. if we get more records then how to split the records and send it third party system.
Please suggest on this.
Thanks,
Krish
For allow call future methods from batch you need implement Database.AllowsCallouts interface
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks,
Alex
Database.AllowsCallouts will be used to send the information(call out-httprequest) to external system from the batch job itself. we can't call the future methods from the batch job.
Thanks,
Krish
You can change batch size to 1.
Thanks,
Alex