You need to sign in to do that
Don't have an account?
D McGovern
Second attempt was to simply embed the flow on a basic visualforce page and try to make it look like Lightning:
Ideally I can figure out why the lightning-styled flow via component in a vf page isn't working. Help? Even then, I wonder if I'll have the same trouble accessing all Contacts that I'm currently encountering in my Classic Flow, or if that's another reason for the component workaround.
Thanks for any suggestions.
Trouble with Flow on force.com Site
I was inspired by this post: https://goravseth.com/using-flows-as-a-form-tool-for-external-users, but I get an internal server error each time I try to acess the visualforce page from the code in that post. I have Communities enabled and it's pointing to an active Flow in my org. The steps I took:
- Create a Lightning application with provided code in dev console and save
- Create visualforce page with provided code in dev console, replace flow name with API name of active flow in my org
- Preview and get: An internal server error has occurred Error ID: 2107398568-65430 (-697475282)
First question: why isn't the following visualforce page working?
Lightning application copied:
<aura:application access="global" extends="ltng:outApp" implements="ltng:allowGuestAccess" > <aura:dependency resource="lightning:flow"/> </aura:application>Visualforce page:
<apex:page > <html> <head> <apex:includeLightning /> </head> <body class="slds-scope"> <div class="slds-scope"> <div id="flowContainer" /> <script> $Lightning.use("c:flowVF", function() { // Create the flow component and set the onstatuschange attribute $Lightning.createComponent("lightning:flow", {}, "flowContainer", function (component) { // Set the input variables // Start an interview in the flowContainer div, and // initializes the input variables. component.startFlow("test_flow"); } ); }); </script> </div> </body> </html> </apex:page>
Second attempt was to simply embed the flow on a basic visualforce page and try to make it look like Lightning:
<apex:page lightningStylesheets="true"> <flow:interview name="test_flow"> </flow:interview> </apex:page>...it works great when I open the visualforce page. However, as soon as I switch to Sites:
- Lightning style is lost. I'm guessing that lightningstylesheets is something not accessible by a sites guest user, or something along those lines which is why the post I mention above goes through the hassle of creating a component?
- Flow doesn't find any records to display. It accepts an email address, looks for a Contact, and displays first name if found. When run via visualforce page directly it works great. When run on Sites, no return for first name. I'm guessing it's because the site Guest Profile doesn't have access to all Contacts, but I only see the option to grant Read and Create permissions, not View All. Is there another sharing/permission setting that I need to update? Where would I go for this?
Ideally I can figure out why the lightning-styled flow via component in a vf page isn't working. Help? Even then, I wonder if I'll have the same trouble accessing all Contacts that I'm currently encountering in my Classic Flow, or if that's another reason for the component workaround.
Thanks for any suggestions.
However, I'm still stuck in Classic style on Sites but not on the VF page. Using the simple VF page with Stylesheets shows two white "Next" buttons while the component version just has one blue one. They both render exactly the same on a Site, though:
VF pages:
When viewed on Site:
Is it possible to get Lightning style on a Site? What am I missing?