8

As described here https://developer.salesforce.com/trailhead/lex_dev_visualforce/lex_dev_visualforce_intro Visualforce pages can be added as Components in the Lightning App Builder:

enter image description here

I have a slightly different scenario: we need to embed a Visualforce page on a Lightning Community page. Unlike in the documentation above, Communities are not edited using the Lightning App Builder, but using the Community Builder instead.

Now as an unfortunate it seems that in the Community Builder, the Visualforce component is not available under Standard nor in any other section:

enter image description here

Does this mean, there is no way to embed a Visualforce page on a community page right now?

5

As for now, it looks like the only option is to iframe the Visualforce page in a component.

If on Napili template, the src of the iFrame should be append by '..' as follow:

<iframe src="../apex/MyVFPage" />

Keep in mind that this is a workaround (maybe even a hack), so be aware that it might be broken in the future, e. g. like it's going on with other workarounds. So this technique comes explicitly with an caveat emptor and you use it on your own risk.

UPDATE

We have received an info from Salesforce support:

I saw that on that forum , someone has asked to use iframe , salesforce does not support iframe after winter 16 release.

So as for now it looks like we don't have that feature at all.

  • 1
    Hi - I think there may be some confusion here. There are Homepage components for the standard UI/tool and then there are Components for the community tools - these are unrelated. You can use Iframes in lightning components for a community homepage as of Spring and Summer 16 - in fact they are promoted in numerous documents. – Kevin May 24 '16 at 17:42
2

See this link from the Spring '17 official documentation:

Harness the Power of Visualforce in Template-Based Communities

Have you customized and perfected your community using the Salesforce Tabs + Visualforce template? Would like to enjoy the benefits and enhancements available in a Lightning-based community but still continue to use your Visualforce customizations? We’ve got you covered! Your Visualforce pages, actions, buttons, links, and canvas apps now work in Customer Service (Napili)-based communities.

For example, say that you have the Salesforce CPQ (Steelbrick) app installed in your org. You can create a Quote detail page and use the Visualforce Page component to display the Quote line editor or other pages. Your configured actions, buttons, and links, associated with standard or custom objects, work in communities as well. And canvas app overlays let you host third-party applications in your community.

Getting Started

  1. Give Visualforce page access to users by profile.

    From Setup, enter Profiles in the Quick Find box, then select Enabled Visualforce Page Access.

    Enable Visualforce page access

  2. Make the Visualforce page available for your community.

    From Setup, enter Visualforce in the Quick Find box, then select Visualforce Pages. Enable Available for Salesforce mobile apps and Lightning Pages.

    Make Visualforce page available

    Tip When developing your Visualforce page code, set the showHeader attribute to true. Branding properties you set in Administration | Branding in Community Workspaces or Community Management also apply to the Visualforce page component in your Customer Service (Napili) community.

1

Here's an update with using visualforce and lightning components. An article by Bob Buzzard regarding: Lightning Design System in Visualforce Part 1 - Getting Started. Article in using LDS and VF together

enter image description here

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.