I have a VWF that begins is launched through a custom button on an Account record. There is a screen input element where an end user inputs a value. I need to know how to loop through all of the User object records to find the User object record that matches the field from the end user screen input element. From there I need to update a custom field on the Account record that the flow was launched on with a custom field that is retrieved from the User record that matches what was input on that screen element. It seems like a cross-object loop to me. The flow begins on the Account object, the loop goes through the User object, and the update goes back to the Account object. Thanks so much for your help!


  • If you post what you've written so far and where you're stuck, I'm confident you'll find plenty of people willing to assist you.
    – crmprogdev
    Commented Jul 18, 2016 at 4:46

2 Answers 2


Here's how to use loop in Visual flows, a sample example.


Another one showing how to update Accounts using loop



Instead of going for a loop, Using "Record Lookup" element you can query the user object record that matches with the end user selected input element.

And then assign the result to a SObject variable (User) or assign that custom field of User object to corresponding variable (if it is text then assign it to a text variable).

After that you can assign the Custom field of Account record with the above variable using the "Assignment Element".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .