You need to sign in to do that
Don't have an account?
sasham
Could anyone please answer this (making callout form batch apex or Queueable apex)
I need to make a REST callout. I have more than 400 records at time( after bulk insert (more than 400 records ) and then need to make callout for sending each record to external sytem) .
Please guide whcih approach is better to follow
Create a batch and make callouts from the batch (scope is 1)
Or
Create trigger and then excecute the queueable apex to make callout
Please guide whcih approach is better to follow
Create a batch and make callouts from the batch (scope is 1)
Or
Create trigger and then excecute the queueable apex to make callout
Use the second option :
Create a trigger and then execute the queueable apex to make callout.
Hope this helps you!
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com
I am also into interfaces at the moment and I follow your answers here at the community for self learning. I understand that Trigger is one way of achieveing the above mentioned use case, but I would also like to have your opinion on why batch callout with a scope of 200 is not good.
Thanks.
Cheers,Dev
And also Pls let me know is it possible to know why is queueable apex is better option than batch apex for this situation
it depends upon how is your callout sending the data. there is a limit on callouts, 100 at the moment and enqueue max 50 jobs. if each call out handles 1 record, then i think we hv a problem. thats why i asked Varaprasad to clarify. As I am myself not sure, but I think a batch could solve our problem, bcz for Batch Apex, these limits are reset for each execution of a batch of records in the execute method.
Trigger - involke queueable apex form trigger - queueable apex handles callouts( for more than 400 records ),