Is there a way to pass into VisualFlow the username (or other $User value) so that you know which user is running the flow?

I've tried to use this:


But this requires two Record Lookups (Account, then User), and the Flow is not retaining the User value. Any idea why?

Thanks for any help.

  • You can put the flow inside a VF page. If you do this, you can then use a controller and the controller can access the flow and set variables. – dphil Sep 23 '14 at 21:01

This functionality is not built into flow. My work around is to create a formula field called CurrentUser on the object (Account in your example) with a value of User.Id in the formula. I can then read that value in when I do a record lookup on the object and optionally do a record lookup of the UserId to get username, email, etc. This works well when running the flow from an Visualforce page/button.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.