Force.com sites allow unauthenticated visitors access to custom (and some standard) Salesforce sObjects
. While providing public access to data stored in Salesforce might seem like a security risk, it is a perfect fit for dynamically-generated website content; content authors don't need to know to be able to edit Visualforce pages in order to update the content of the site.
In this recipe we will create a Visualforce page that renders content from the three most recently edited records of a custom sObject
. We will then make this page publicly available via an unauthenticated Force.com site.
This recipe requires that you have already completed the Creating a site recipe, as it relies on the custom domain and Force.com site created in that recipe.
This recipe requires a custom sObject
that encapsulates the items to display on the site.
First, create the site content custom
sObject
by navigating to Your Name | Setup | Create | Objects.Click on the...