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

    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.

Visualforce Page Component

In Community Builder, add the Visualforce Page component to your page. Then edit the component to select the Visualforce page to use. If you installed the Salesforce CPQ (Steelbrick) app, those pages are available for selection here.Set Visualforce page name
Note

Note

If the Visualforce page requires the Record ID from an object such as Account, create object pages for Account. Then drag and drop the Visualforce Page component onto the object’s detail page. The Record ID field adjusts to the object’s ID.

Custom Actions

Visualforce custom actions let users perform tasks, such as creating records. If you have custom actions with an action type of Custom Visualforce associated with a Visualforce page, these actions now work in published communities. When users click the action button, the associated Visualforce page displays.

Note

Note

Overrides to standard Visualforce actions such as View, New, Edit, and Delete are not supported in communities. These buttons on record detail pages don’t display in communities.

Custom Buttons and Links

Visualforce custom buttons and links let users interact with Salesforce data and with external websites and services. If you have custom buttons and links with a content source of Visualforce Page, these buttons and links now work in published communities. When users click the button or link, the associated Visualforce page displays.

Note

Note

The Behavior setting for custom buttons and links is not supported. When users click custom buttons in published communities, the Visualforce page is always displayed in the current window.

Visualforce custom list buttons are not supported in communities.

Canvas Apps

Use canvas apps as custom actions to give users access to the functionality of your apps in communities. Configure your canvas app for Lightning Component and Visualforce Page in Canvas App Settings. You can then load the canvas app inside a Visualforce page, Visualforce action, and Lightning components in published communities.

Note

Note

Canvas quick actions are not available for guest users.

You can opt to hide the publisher header and publisher Share button in Canvas App Settings.