I am trying to use the records entered the schedule triggered flow as a collection variable so that I can use it in the loop elemetn in the flow
There is condition for the records to enter a schedule-triggered flow in SF already.
The start element in my flow has the same condition as the Get Records element.
In the loop element, it needs a collection variable (currently I am using the collection variable from the Get Record Element and everything is working with no issue).
When I tried to save my flow, SF gives a warning saying below
These issues don't prevent activation, but can cause problems when you run the flow. Get_Lead_in_Journey_Active_Status (Get Records) - The “Get_Lead_in_Journey_Active_Status” Get Records element in this flow can cause performance issues. At run time, the flow starts an interview for each record specified in the Start element and stores each lead in the $Record global variable. Check whether the “Get_Lead_in_Journey_Active_Status” element is still necessary, or add a filter so that the element accesses only the lead in the $Record global variable.
Is it redundant to have to define a get records element with the same condition as the start element? If so, is there a way to reference the collection varibale that has all the records enetered the scheduld flow?
Seems the $Record global variable is not a collection variable I can use in my Loop element. It really confuses me why SF is giving this warning. What can I do to prevent this warning from showing up ?