communities
Salesforce Login Page: Custom login page with Visualforce and Apex for Salesforce Communities
4:39 PM
This article is a simple explanation of the use of the Site.Login()
Apex method. The documentation in detail from Salesforce is here http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_sites.htm.
STEP 1:
Enable Communities by going to the below path, Your Name -> Setup -> App Setup -> Customize -> Communities -> Settings
STEP 2:
Create a new Community as shown below
STEP 3:
Create a Apex Class as shown below
Note: Replace 'null' with the URL to be redirected to after login.
STEP 4:
Create a Visualforce page 'CustomLoginPage' as shown below
STEP 5:
Navigate to Manage Communities from the setup menu, and click the 'Force.com' link as below
STEP 6:
Make the following changes as shown below.
STEP 7:
Modify the Apex Class 'CommunitiesLoginController' as below
STEP 8:
Modify the Visualforce page 'CommunitiesLogin' as below
STEP 9:
Make sure you publish the community. Navigate to the URL and you should see the custom login page as below.
STEP 1:
Enable Communities by going to the below path, Your Name -> Setup -> App Setup -> Customize -> Communities -> Settings
STEP 2:
Create a new Community as shown below
STEP 3:
Create a Apex Class as shown below
Note: Replace 'null' with the URL to be redirected to after login.
STEP 4:
Create a Visualforce page 'CustomLoginPage' as shown below
STEP 5:
Navigate to Manage Communities from the setup menu, and click the 'Force.com' link as below
STEP 6:
Make the following changes as shown below.
STEP 7:
Modify the Apex Class 'CommunitiesLoginController' as below
STEP 8:
Modify the Visualforce page 'CommunitiesLogin' as below
STEP 9:
Make sure you publish the community. Navigate to the URL and you should see the custom login page as below.