1 INTRODUCTION TO FORCE.COM
If you want to add new pages or
customize existing pages in your community, you can use Force.com Sites . With Force.com , you can create branded, publicly
available pages such as landing or marketing pages, and private custom pages
that only community members can access.
What we can
achieve using Force.com
·
We can create
public, branded pages that anyone can access.
·
Leverage Visualforce to
create private pages that you can add as a tab within your community.
·
Write your own
controllers, or extensions to controllers, using Apex code.
·
Create custom
login or self-registration pages.
2 GUIDE TO CREATE FORCE.COM CUSTOMER COMMUNITY
2.1 SET UP FORCE.COM SITE
·
From Setup, enter Sites in the Quick
Find box,
then select Sites.
·
Register a custom Force.com domain for your organization.
·
Create and configure your site.
·
Develop and use Visualforce pages for your site, use or hide standard pages, and customize
or replace
out-of-box error pages. Associate
these pages with your site.
2.2 ENABLE A PORTAL WITH FORCE.COM SITE
·
From Setup,
enter Customer
Portal Settings in
the Quick Find box, then select Customer Portal Settings.
·
If you have
not enabled your portal, select Enable Customer Portal and click Save.
·
Click Edit for the portal you want to
modify.
·
Configure the
portal as follows:
1.
Select the Login Enabled checkbox.
2.
Select a user
for the Administrator field.
3.
Optionally,
set the Logout URL. If this is not set, users are taken to the
site home page on logout.
4.
Click Save.
If you are
using a Customer Portal and want to allow self-registration, follow
these steps:
From Setup, enter Customer Portal Settings in the Quick Find box, then select Customer
Portal Settings.
·
Click Edit for the portal you want to
associate with your Force.com site.
·
Configure
the Customer Portal as follows:
1.
Select Self-Registration Enabled.
2.
Select Customer
Portal User for both the Default New User License and Default
New User Profilefields.
Depending on your portal license, you may want to select a different profile
for the Default
New User Profile field.
3.
Select User
for the Default
New User Role field.
4.
Click Save.
·
From Setup,
enter Customer
Portal Settings in
the Quick Find box, then select Customer Portal Settings,
or from Setup, enter Partners in the Quick Find box, then select Settings.
·
Click the name
of the portal that you want to associate with your site.
·
Click the name
of each profile associated with your portal users and do the following:
1.
Scroll down to
the Enabled Visualforce Page Access section and click Edit.
2.
Add the
appropriate public site pages to the Enabled Visualforce Pages list. This allows portal users with that profile to view these
pages.
Associate your
site with the login-enabled portal:
·
From Setup,
enter Sites in the Quick Find box, then select Sites.
·
Click the site
label of the site you want to configure.
·
Click Login Settings.
·
Click Edit.
·
From the Enable Login For drop-down list, select the name of the
portal where you want to allow login.
·
Select
the Change
Password Page.
·
Click Save.
For sites
with Ideas, Answers, Chatter Answers, you must make
the zone visible in the portal and enable the IdeasHome or
AnswersHome page for the site. To associate the zone with one or more
portals:
1.
From Setup,
search for one of the following in the Quick Find box.
·
Ideas Zones
·
Chatter Answers Zones
·
Answers Zones
Click Edit next to
the zone you want to make public.
From the Portal drop-down list, select the portal to use for this zone. You
can choose to show the zone in all portals.
2.3 SETTING UP VISUALFORCE PAGES ON SITE
· Now you can add multiple visualforce pages for
site by Moving a VFP from Available VFP Multi Select picklist to Enable VFP
picklist.
· Then the url of the vfp will look like this,
https://url-of-your-domain-developer-edition.ap2.force.com/CustomVFP/