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
Gwen ONeill 9Gwen ONeill 9 

Update 2 Objects using Flow

I'm trying to update 2 objects in Flow and since I'm fairly new to Flows, I think I am missing a filter or something (?) because the account object  updates, but the opportunity doesn't.  Here is what I have so far:User-added image
PriyaPriya (Salesforce Developers) 

Hey Gwen,

Can you kindly elaborate the issue?

Thanks & Regards,

Priya Ranjan

Gwen ONeill 9Gwen ONeill 9
I am able to use the Update Records to update the Account, but then when I try to use Update Records for the Opportunity, The flow fails.  I assumed I didn't need to use Get Records or Assignment, but maybe I'm wrong?  Basically, when we update the Account status with the flow, we want the corresponding Opportunity Stage to update as well.
PriyaPriya (Salesforce Developers) 

Hi Gwen,

After the Account get update, you have to the get the opportunity record and then do the Update record. 

Kindly mark it as the best answer if it works.

Thanks & Regards,

Priya Ranjan

Shiraz HodaShiraz Hoda
Hi Gwen,

After the Account gets updated, Use get records to get opportunity and select multiple opportunity because account can have multiple opportunity. After that loop over each opportunity from collection and update the record and keep them in separate collection and use this collection to update Opportunity. 

Kindly mark it as the best answer if it works.