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
David JobeDavid Jobe 

Building a Fast Flow

I am trying to build a "fast flow", but have never designed anything with a loop. I can make it work on an individual basis, but turning into a bulkify process I am struggling with.

I have two Objects. 
1. Opportunities (standard object)
2. Client_Details__c (custom)

On both objects there is a custom field called Client_Number__c.
I need a flow that kicks off every morning that checks for any Client_Details__c records that do not have the look up field Opportunity__c field filled out. It then takes those records and compares the Client__Number field on the Client_Detials record against the Client_Number on all the Opportunity records to find a match. Once found it takes the ID for the Opportunity and inputs it to the Opportunity__c field on the Client_Detials record. After all have been processed, it updates all the records as one action. 


Any assistance would be great.

Shruti SShruti S
I don't think we can achieve this using Flows. I am guessing we will need a Scheduled Apex for this.
Meenu MathewMeenu Mathew
Hi David,

Use sObject Collection variables for the above scenario.

Or using Trigger.
As you have said, we can link an opportunity with a client detail record with its Client_Number__c.
If we change the Client _Number__c of Opportunity later, then do we need to again re-link that Opportunity with another Client_Details? If this is your scenario its can be done by Apex Trigger.