function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ethanoneethanone 

lightning runtime in flow in visualforce page

When running a flow in Classic, lightning runtime works great to allow uploading files. When the same flow is wrapped in a VisualForce page (so that you can use the button override), lightning runtime does not work. How can i either A) override a button with a flow NOT using Visualforce or B) enable lightning runtime on a flow wrapped in a VisualForce page?
Khan AnasKhan Anas (Salesforce Developers) 
Hi,

Greetings to you!

According to Salesforce doc:

By default, when you embed a flow in a Visualforce page, the flow renders in Classic runtime. Like its name suggests, Classic runtime looks and feels like regular Visualforce pages and the Salesforce Classic desktop experience. If you want your flow to render in Lightning runtime in your Visualforce page, embed the flow Aura component to your Visualforce page.
  1. Create a Lightning app that declares a dependency on the lightning:flow component.
  2. Add the Lightning Components for Visualforce JavaScript library to your Visualforce page using the <apex:includeLightning/> component.
  3. In the Visualforce page, reference the dependency app.
  4. Write a JavaScript function that creates the component on the page using $Lightning.createComponent().

Please refer to the below links which might help you further with the above requirement.

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_flows_lightningruntime.htm

https://salesforce.stackexchange.com/questions/201278/flow-in-visualforce-page-not-displaying-in-lightninglooks-like-classic

https://developer.salesforce.com/forums/?id=9060G000000BhIoQAK

https://help.salesforce.com/articleView?id=flow_distribute_runtime.htm&type=5

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas