Question Ultimately, in Flow, after performing a FastLookup on OpportunityContactRole and storing the result as a Sobject Collection flow Variable, how would I enhance the same flow so that it performed an efficient update on a list of Contacts determined by all the ContactIDs within the OpportunityContactRole sobject collection variable?
Here's more background on what I'm trying to achieve:
I have a process builder on Opportunity.
When Stage becomes Won I want to update a custom field on all Contacts that are OpportunityContactMembers members of the Opportunity.
Th Flow is called from Process Builder and OpportunityID is passed to the Flow.
The flow needs to updates a custom_picklist_field__c on all Contact(s) found in the Opportunity’s related OpportunityContactRoles.
This link (https://success.salesforce.com/answers?id=9063A0000019RiqQAE) is not an answer because it updates only the primary contacts.
I dont want to use Apex to perform the update on Contacts but essentially I want the Flow to achieve what (in apex) would be a DML Update made to these Contacts: SELECT ID FROM Contact where ID IN (select contactid from opportunitycontactrole where opportunityID=:oppRecordBeingProcessedByProcessBuilder)
The flow starts with a "FastLookup” of OpportunityContactRoles, finding OpportunityContactRoles WHERE OpportunityId =:OpportunityIDFlowVar.
However from here I dont know how to use Flow Designer to efficiently (preferably 1 fastUpdate) update the Contacts found in the ContactIDS within the OpportunityContactRoles. Even if I assign the result of "FastLookup OpportunityContactRoles" to a sobject collection flow variable of type OpportunityContactRole what would be the next step for updating Contacts that meet the requirement stated above? Would the next step after the fastLookup be to flow loop over its result and do what kind of assignment? Ultimately how would I loop over a sobject collection variable of Type OpportunityContactRole in flow and prepare an update for many Contacts?
Thanks for the help,