Trying to build a flow that used GET RECORD to pull a filtered list of Opportunities, and use the AccountIds from these Opportunities to update a list of Accounts.

The only way I have achieved that is by pulling a collection of opportunities, looping through every opp and getting the Account where Accountid = Opp.Accountid and updating the record.

The issue with this method is that I have a GET RECORDS inside my loop which causes me to exceed my allowed SOQL queries.

Please advise / is there a better method instead of a flow to approach this.

enter image description here enter image description here enter image description here

  • 1
    You can loop over the collection of opps and use an assignment in the loop to build a sobject collection of accounts to update. Then you can do one update record to update all accounts.
    – gorav
    Nov 5, 2019 at 23:30
  • you should use edit and post a screen shot of your flow
    – cropredy
    Nov 6, 2019 at 1:39
  • Hi Gorav, thank you for taking the time to respond. I currently only have the AccountID from the Opportunity Get Records. How do I use that (Opportunity.AccountID) along with an Assignment logic to create an Account collection of that I can use to update after the loop is over without doing an Account Get Records inside the loop? In other words, how do I get the single account record using the opp.accountid that I can then modify and add in a collection of accounts all inside the loop? edit: I feel like I am missing a step before my loop decision
    – FD-SFDC
    Nov 6, 2019 at 1:42


You must log in to answer this question.

Browse other questions tagged .