You need to sign in to do that
Don't have an account?
Reference to flow ID
Hi people,
I'm looking for a way to use the ID of the current flow in a reference.
I'm building a flow for people to request contracts. The steps are basically this:
- First they choose which company the contract is for (or pass its ID via the url)
- They then have to choose which contract
- Provide data
- confirm and the contract then gets submitted for approval (Thank you so much raja-sfdc for the plug-in for that!)
The problem is that for one contract people need to upload a file to the record. The file upload doesn't work from inside Flow so I've made use of the retURL (which is a parameter in the upload screen url containing the location to return to).
Basically I'm providing a link to the upload page which then returns to the flow afterwards:
salesforce.com/p/attach/NoteAttach?pid={!var_RecordID} & parentname={!ret_ContractNumber}
& retURL=/flow/Contract_Request_Wizard/ {!var_FlowID} ?var_RecordID= {!var_RecordID}
This works perfectly except that I have to provide the var_FlowID manually each time. Is there a way that the flow could actually pass its own ID to the var_FlowID?
I hope I explained my problem clearly enough and that somebody is able to help!
Thanks!
So I fixed it. I have to say I copy/pasted it from someone else, but forgot from where. Thought I'd share it here for others.
I created an apex page with the code:
And then I also needed a controller:
And this takes the variable "var_recordID" from the flow and uses it as reference. The only thing that I'm puzzled about is that the finish location is {!oid} and that the controller only uses getOID(). Not sure why it works, but it does!
All Answers
So I fixed it. I have to say I copy/pasted it from someone else, but forgot from where. Thought I'd share it here for others.
I created an apex page with the code:
And then I also needed a controller:
And this takes the variable "var_recordID" from the flow and uses it as reference. The only thing that I'm puzzled about is that the finish location is {!oid} and that the controller only uses getOID(). Not sure why it works, but it does!