I've written an apex trigger than runs when an Event
is updated, and makes a callout to an external application (a slack app) to update details about that event in slack. The trigger just makes a callout with the Id
.
Because of recent changes, now the external representation (in slack) of some old events is now inaccurate. I need the update trigger to run on those old events.
I want to run a query to select a group of records that would look like
Select Id from Event where RecordTypeId = '...' AND ...
with a few other filter options. I expect the set of records to be a few hundred.
I want to then force my update trigger to run on those applications. If this is not possible, can I write an apex script that will select a set of records and make a callout for each one? Ideally I'd like to set a 1000ms wait timer between each one to avoid overloading my external application if possible.
What is the best course of action?