Setting flow finish behavior without a custom controller
Until now, in order to redirect the user to a record created in a flow, you needed to embed the flow in a visualforce page, and use a custom apex controller to get the record Id from the flow so you can use pass it to a pagereference method and direct the user to the record.
This meant that you could not use lightning runtime (as flows embedded on visualforce pages will only use classic runtime) and that you needed to write up a custom controller.
No longer! With winter18, you can use the lightning flow component on a visualforce page - and that component automatically has access to flow variables via the outputVariables variable/property. (i have very limited js knowledge so please share the correct terminology).
Start with the sample code on developerforce.
It has a couple of issues and will not work as written, but a fine fellow who goes by Charles T on sfse guided me to a...
Continue reading →