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

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)
Create trigger and then excecute the queueable apex to make callout 
v varaprasadv varaprasad
Hi Sasham,

Use the second option : 

Create a trigger and then execute the queueable apex to make callout.

Hope this helps you!

@For Support:
Hi Varaprasad,

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.

Thank you Varaprasad. Could you plese let me know how many callouts that i can make from queueable apex. is it possible more than 400  in singl rtransaction . That is what i  am  worried about .
And also Pls let me know is it possible to know why is  queueable apex is better option than  batch apex for this situation 
hi Sasham,

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.
Could anyone answer for this situation . Is it possible to make callout form queueable apex. for more than 400 records ( each cllaout  handles one record )
Trigger - involke queueable apex form trigger - queueable apex handles callouts( for more than 400 records ),