Monday, 8 December 2014

Custom login page for Salesforce community


Requirement 
:-

Some time we need to override salesforce standard login page with client login page in salesforce community. 

Solution :

Prerequisite :-  

1) Community should be Setup (for the you can refer my below blog ):-
2) Create A Visual force according to your company requirement
3) Create a controller for VF page. We need to use below code to login in Salesforce.


    
1.    global PageReference CustomLogin()   
2.    {  
3.      return Site.login(username, password, null);   
4.    }  



  1. Once you create new community then click on Customize -> Communities -> All Communities, then from click on Force.com.
  2. Then go to "Site Visualforce Pages". And select you page.
  3. Click on Edit button on community and add your Vf page in "Inactive Site Home Page" and Save.
  4. Click on "URL Redirect" 
  5. Now add source URL (Ex. /Employee/login ) in Source URL text box and partial target URL in (Ex. /Employee/CommunityCustomLogin ) in Target URL text box and click save.
 Thanks,
Amit Chaudhary
Email:- amit.salesforce21@gmail.com

No comments:

Post a Comment