I'm looking to use a flow to complete the following and am stuck. Any help is appreciated!
- Project Number is a text field on custom CC Project object; Opportunity also has a Project Number text field. These should be able to match up.
- I need the flow to find related Opportunity record using Project Number input when CC Project record is created/updated and then populate Associated Opportunity lookup field on CC Project record.
Any suggestions on how to complete this?
Davis Johnson (SolomonEdwards) Forum Ambassador
To clarify the steps:
1. Custom CC Project record is created (with a non-null Project Number)
2. Flow should take that number and search across all opportunities to retrieve the first matching value of an existing opportunity record with the same value in their project number field
3. If that GetRecords element returns a value (is not null), update the triggering CC Project record's lookup field to the retrieved Opp
Is that correct for the Insert use case? If so, that's probably the replicable logic for both logical paths (update or insert), you just might want to make your entry criteria something like 'Where Associated Opportunity Lookup is null' and the record is updated or inserted. In flow steps:
1. Entry Criteria
2. Get records on Opp where Project number from $record matches project number from Opportunity object, only return the first record
3. Decision element (if a result is returned)
4. Update triggering record