Force.com Sites

This tutorial gives an overview of how to include Skuid in Force.com sites.

Example: We want to make a products page like this for our Site.

image0

Step 1: Create the Skuid page you want to use for your site.

image1

A. Create a “Published to Web” field.

image2

If you create a “Published to Web” field on your object, then you can create a condition to only show records on this page that have been published to the web (i.e. are available for public viewing).

Note

A security best practice would be to implement this restriction as a criteria based sharing rule so that the the site user was actively prevented from seeing these “unpublished” records, rather than merely hiding them in the UI. The condition based approach will improve usability, but it cannot truly be called security.

B. Add Components to your page.

image3

Our example Products page has a Page Title, tabs to divide our different types of products and info request form, and a Table with a View Product row action and a Photo View.

Step 2: Create a Visualforce page for your new site.

This Visualforce page should just redirect to the Skuid page you created in Step 1.

For Force.com sites, you’ll need to use the skuid:page Visualforce component in your markup, not the Redirect method.

To draft your markup, refer to the basic overrides without page assignments section of our documentation.

Note

There are required steps that must be completed before the skuid:page Visualforce component can be effectively used. Be sure to read the skuid:page Visualforce component prerequisites section before you start building.

Step 3: Go to Setup > Develop > Sites and create a new Site.

image5

A. Edit Site properties and for Active Site Home Page, choose the Visualforce page you created in Step 2.

image6

Back in Salesforce Setup… Aren’t you missing the autocomplete lookups from Skuid right now? I know I am.

Step 4: Edit Public Access Settings for your new Site.

image7

A. Go into Object Settings.

image8

B. Choose the appropriate object.

image9

C. Edit object settings so that this object is visible for viewers of this Site.

image10

Custom Objects: Remember that if you are creating custom objects for this site - until they have been deployed the external user will be unable to access them.

D. Click Visualforce Page Access, and click to Edit.

image11

E. Include the Visualforce Page you created in Step 2.

image12

  1. Select from Available Visualforce Pages the Visualforce page you created in Step 2.
  2. Click to Add it to the Enabled Visualforce Pages list.
  3. Click Save.

Step 5: Edit Permissions for the Site User Profile.

image13

On your Site Profile page, click Assigned Users.

A. Click to edit the Guest User Profile.

image14

B. Edit Permission Set Assignments.

image15

C. Make Sure the Guest User has permission to View Skuid pages.

image16

D. Select the user and make sure they have a Skuid license (subscription)

image17

Note

Within the Salesforce universe, the term “Skuid license” refers to a user’s ability to interact with Skuid. While the Skuid UI reflects this terminology to avoid confusion, the “number of Skuid licenses” you have refers to purchased Skuid subscriptions.

Do not attempt to go to Setup - Manage Users (etc) to add the Skuid license the guest user. Also do not attempt to go to Installed Packages – Skuid - Manage licenses. Neither way will get you to the guest user. Go through the setting for site - public access settings.

This one Skuid license is for all unregistered web traffic to your site.

Final Checklist

Here’s a checklist to make sure that everything is set up properly:

  1. The Site’s Guest User Profile — accessible by clicking on “View Public Access Settings” from the Force.com Site you’re using. This is the Profile you have to edit to ensure that the correct Objects, Fields, and Visualforce Pages are accessible.
  2. The “Site Guest User” record — this user needs to have a license of Skuid, as well as the Skuid Page Viewer Permission Set assignment.
  3. Sharing Rules — if you want the Site Guest User to be able to see any records, such as Products, then you need to share these Records read only with the Site Guest User — to do this, you either need to create a Public Group, and add the Site Guest User to it, or use the built-in “All Site Users” (something like that) group.
  4. Visualforce Page access —- you’ll need to use the <skuid:page> component to include your Skuid Page in a Visualforce Page that will make up your Site. The Site Guest User must have access to these Visualforce Pages.
  5. SKUID PAGE record level access — you’ll need to either make all of your Skuid Pages Public Read Only, or share specific pages with the members of your Public Group, so that people can actually see the Skuid Pages.