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
Delinda TinkeyDelinda Tinkey 

Embed VF in Lightning Component on Community Pages

I have a flow embedded on a VF page and a lightning component with an iframe to the VF page. The VF page renders for me when I log into the community (Napili template), but not when I log in as an external user. I have ensured the external user has access to the VF page.

How can I expose this VF/flow to external users? Here's my lightning component:

<aura:component implements="forceCommunity:availableForAllPageTypes" access="global">
    <iframe src="https://xxx.salesforce.com/apex/my_vf_page" width="100%" height="1000px;" frameBorder="0"/>
</aura:component>
LakshmanLakshman
The VF as an iframe in community is no longer supported after Winter 16. More details here- http://salesforce.stackexchange.com/questions/97429/how-to-use-a-visualforce-page-as-a-component-lightning-community-page
Delinda TinkeyDelinda Tinkey
Is there another way to expose a flow to external users?
LakshmanLakshman
I havent seen a solution for Napili theme, its too much restricted for complex customization, but we can definately do this using VF + Tabs template and do custom branding but it costs lot of time.
Delinda TinkeyDelinda Tinkey
Thank you for your responses! One last question - could a lightning component be developed that behaves like a flow? i.e. a form with conditional fields displayed (based on answers) that ultimately creates a new object? Presumably a developer could build that easier than customizing the VF + Tabs template.
LakshmanLakshman
Yes that is possible if its done via lightning components. 
Erhan FIRATErhan FIRAT

I have faced same problem as you... I realize that when the url is starts with "/apex/page_name" it gives 503 error. But if url starts with full adress "https://your-domain.salesforce.com/apex/page_name", it is opened. 

So, to get full url I am using:

String pageUrl = anyPage.getUrl();
return Site.getBaseUrl() + uploadUrl;
R MojumdarR Mojumdar
You can use this:  It should work

<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global">
    <iframe src="{! '/apex/YourPageName'}" width="100%" height="500px;" frameBorder="0"/>
</aura:component>
Navita_007Navita_007
Hi Delinda Tinkey,

Did you find a solution for this problem? I am stuck too.

Thanks,
Navita