You need to sign in to do that
Don't have an account?
Start force.com flow with variables populated
To warn you I am new to apex. Here is my situation. I have created a flow (not workflow but flow) that my salesguys use for their sale. Right now I have created a button that is labeled Start Sale. I have placed the button on the lead and the button is just a url that goes to /flow/Sales_Flow which is the flow. The salesguys have to copy the ID out of the address bar on the lead to get the ID of the lead into my flow. I am hoping to create an apex button or code of some sort that will take the ID of the lead that the button is on and put that ID into a field that populates a variable called leadID in my flow. I figure there has got to be a way to have that variable populated when the flow starts so that they do not have to copy it, but I cannot figure out how to do it.
Thanks for the help.
In the button you have for the flow, you can add in the below to teh end of your url
?leadID={!Lead.Id}
All Answers
In the button you have for the flow, you can add in the below to teh end of your url
?leadID={!Lead.Id}
I had tried this before and it did not work. I figured out what I did wrong after looking at this though. I had the variable set to private. I needed to set the input/output type to allow input.