1

Hello and thank you in advance for any help/knowledge you can share!

My use case is that I need to allow access to a flow for some of my coworkers who are not Salesforce Users. An essential element of the flow is a file upload component - which means I need to display the flow in lightning runtime instead of the classic runtime which is the default on a visualforce page. I have found several articles with documentation to help, particularly this one: https://goravseth.com/using-flows-as-a-form-tool-for-external-users

I have created the lightning app aura component with the exact code copied and pasted from the article above.

I have created my visualforce page with this code (which references the name of the component above, and my specific flow:

<apex:page >
   <html>
      <head>
         <apex:includeLightning />
      </head>
      <body class="slds-scope">
         <div class="slds-scope">
         <div id="flowContainer" />
         <script>
            $Lightning.use("c:lightningOutApp", function() {
               // Create the flow component and set the onstatuschange attribute
               $Lightning.createComponent("lightning:flow", {}, "flowContainer",
                  function (component) {
                     component.startFlow("Approve_Check_Request");
                  }
               );
            });
         </script>
          </div>
      </body>
   </html>
</apex:page>

Here is also a screen shot of my codescreenshot visualforce page code

When I preview the visualforce page, it looks perfect and the file upload works like a charmScreen shot of visualforce page preview But the problem is that when I view the actual Force.com page, it is blank, without displaying the flowScreenshot of force.com page

I have also tried adding the show header = "false" tag to the visualforce page, but then the force.com site page just shows up totally blank.

I have gone through the public access settings on the force.com site and made sure that the guest user profile has permission to run flows and read, create, and edit access on all of the objects referenced within the flow. The visualforce page is already enabled by default. I tried to specifically enable the lightning app and the flow, but neither of them are available to enable under "enabled apex class access" or "enabled flow access."

Do any of you know if there is a setting somewhere that I need to enable that would allow the flow to show up on the actual force.com site page instead of only in the visualforce page preview?

It also occurred to me that the code itself could have an error - I don't know much yet when it comes to writing code. I made a new visualforce page with just this code and switched it out as the force.com site homepage.

<apex:page lightningStylesheets="true">
  <flow:interview name="Approve_Check_Request"></flow:interview>
</apex:page>

With that code, the flow successfully displays in both the preview and the actual force.com site pagescreenshot of flow in classic runtime on force.com site

But, it renders in classic runtime and the file upload component will not work.

I can't find any examples of code online that combines both the flow:interview tag with the $lightning.create component tag, so I assume that the flow:interview should not be necessary.

Any suggestions to improve the code itself in case that is the source of the failure of the flow to show up on the force.com page?

Or if anyone knows if there is a way to use a file upload component within classic flow runtime, that would also work as a solution!

Many thanks!

2
  • In the community/experience administration, have you allowed the guest users to upload files. It is a checkbox in experience workspaces
    – manjit5190
    May 2 at 14:40
  • Thank you @manjit5190! I appreciate the comment. I did already allow the guest user profile to access the file object and it didn't seem to make a difference. But, I think I have found a work around solution with chatter free licenses. May 3 at 17:59
0

I found a different work around to bypass force.com sites and visualforce pages altogether. I discovered that users on Chatter Free licenses can access flows, so I am going to add my other coworkers as Salesforce Users on chatter free licenses and distribute the flow to them. That way the flow will automatically render in lightning runtime and the upload component will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.