This is a flow that updates Primary PCA (Lookup to User in Opportunity), Opportunity Owner and Contact Owner. It is looking for these conditions:
IF High School (Account) has a Primary PCA (User lookup in Account) => runs the updates IF NOT
THEN Get all Users where Home Campus on User EQUALS $Record.Home Campus (Text field on Opportunity)
Loop through all retrieved Users to see who has the smallest number of open Opportunities assigned to them
Gets all Opportunities where User is Primary PCA AND Stage = Lead OR Applicant OR Enrolled-Not Paid
is giving me the error Too many query rows: 50001, for 7500 of about a 53k upsert of Opportunities when going through this loop.
The flow above works in tandem with this flow below:
This Flow Flags an Opportunity (Checkbox = True) on creation if Stage = Lead/Applicant, Primary PCA = null and other conditions.. This Flow uses a scheduled path to wait 5 minutes after being triggered to set the flag because there may be additional automation (flow/apex) that kick in after an Opportunity is created that continue to update the Opportunity.
The flow is giving me the following error: This interview has been terminated as another interview in the same bulk execution request failed with the following error: An unhandled fault has occurred in this flow.
Anybody know if these issues can be solved? Anything I can change to the flow? Any help is much appreciated.