On the Lead Object, I have a lookup to 'Schools'. (Not possible to use use Master Detail on Leads so I need to use Lookup. ). Every time a Lead record is set to status 'contacted', I would like to (using process builder /flow): 1. Create a school record 2. Add this new school record to the lookup on the lead object.

If the above is not possible, could I use a custom button to launch a process /flow to complete this? Any ideas? Thanks!

1 Answer 1


So, you could do this with a few different steps in Process Builder (harder to manage), or you can create a Flow that you trigger in your Process Builder. I would suggest the latter... so here are your steps:

Create a new Flow. On the Flow, you want to start creating your variables. What you need is:

variable -> var_LeadId ; Input/Output = Input and Output variable -> var_SchoolId ; Input/Output = Input and Output

Now, create a Record Create element, have it create a School. Have the Record Id at the bottom be populated with var_SchoolId.

Now, create a Record Update element on your Lead. Filter it by the LeadId (which will be passed in through Process Builder), and then do an update of the School Lookup field with your var_SchoolId field.

Set the Record Create element as the starting element. Save. Activate.

Now we want to build a Process Builder. Set it to fire when the status = "Contacted", and then select the action type "FLOW" and then set the Flow we just created, and then set the variable var_LeadId to be passed into your Flow using the "reference" ability.

You should be set!

  • Let me add, this is going to be an Autolaunched flow, so you dont have to do anything. No button needed as you mentioned you might want to use. Think of it as just a workflow rule firing off. Jun 10, 2015 at 16:14

You must log in to answer this question.

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