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

Clearing an SObject Collection

Anyone know how to clear out a SObjectCollection Variable when it runs multiple times in bulk?  We have a flow that sends customers payment reminders.  The flow is triggered by a report and scheduled apex and a single flow will run multiple times in bulk.  The issue we are having is that each time the flow runs it keeps the records from the last run in the collection variable.  If it runs 5 times on the first run it works fine on the second run it has the ID of the first run and the ID of the second and so on.  We found an Answer that said the use of an assignment rule and assigns a variable an empty variable but that didn't work.
This seems really strange that SFDC would do this.
Raj VakatiRaj Vakati
Can you try to set to the NULL