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

Indicate number of webcalls to send

I have an Apex class sending http requests to an enpoint.  I then have a calss that schedules to query an object and send records that match.  The issue now is, I need to control how many this sends.  Basically I need to say:

If records match this criteria, send 100 of them.  Or 500 of them.  

Any idea on how I can accomplish this?  I have thought about trying to use WFR to add numbers to a field and then part of the criteria would be "if The_custom_field__c = 1-100" then fire a trigger to clear those numbers.  This just seems very messy and I am sure there is a cleaner way.  Any thoughts?