I have a flow that assigns Lead owner to the current user. I just want to add a check before assigning owner , The check should be like Check if the current owner has a particular role. Only than assign the lead to current user flow .

  • it can be easily done with workflow rule, Is there any specific reason using flows? Jan 8, 2018 at 19:38
  • Yes Because I am assigning this flow to a button
    – richie
    Jan 9, 2018 at 14:45

1 Answer 1


This can be easily done with Process Builder or a Workflow Rule. But since your question is how to do it with Visual Flow, then these are the steps you can take:

  1. Use a Fast Lookup element to store the Lead's fields (including OwnerId) in an sObject variable (I'll name mine "varLead"). enter image description here

  2. Note: In the Fast Lookup, don't forget to set the OwnerId field in the section labeled "Specify which of the record's fields to save in the variable". enter image description here

  3. Create a new Formula to store the Lead Owner's Role Name using the cross-object field reference dot notation: {!varLead.Owner.Role.DeveloperName} (Make sure to use your Lead variable's name, mine is "varLead"). enter image description here

  4. Add a Decision element to check the value of the new Formula to make sure it is the correct Role. (Make sure to use the Role's Developer Name, aka Role Name, and not the Label). enter image description here

  5. Connect the Decision element to your Record Update element using the valid path. enter image description here


You must log in to answer this question.

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