Apr 18, 2016

Getting Started With Communities

Communities is becoming a necessity to manage customers and partners and why not, it's easy that way isn't it? We (at Briskminds) are currently handling around 10 active projects where we need to implement the communities, but of-course we were also new to it few months back.

We've followed some simple steps to enable and use it, and would like to share that with my fellow community members as well. Let's explore more how we can enable and customize our community.

How to enable communities

  1. Go to Setup > App Setup > Customize > Communities > Settings
  2. Enable the checkbox "Enable communities"

Register For Domain

Once enabled the communities it will ask for the domain name, show in picture. Once registered for the domain you can now create your community, by clicking on “New Community” (Customize | Communities | Manage Communities, then click New Community) button.

Allowing profile to login in community

  1. Once you create new community then click on edit.
  2. It will show the screen as displayed in picture (please remember this, as we will refer the same Edit again and again)

  1. Click on “Members” tab
  2. Once clicked on “Members” tab, it will show the screen as displayed in picture

  1. Here you can enable profiles and give permissions to users
  2. If you are creating a community user then make sure profile assigned to that user is listed here (in “Selected Profile”) else user will not be able to do anything with the email which will be received after new user creation.

Allowing Tabs and Pages
  1. Click on “Edit” against your community
  2. Now click on “Tabs and Pages”, it will show the screen displayed in picture

  1. Select “Use Salesforce.com tabs” (let’s not dive into using site.com as it is a separate topic)
  2. Then you can select the tabs which you want to show to the community users
  3. Note – First tab selected will be the landing tab

Custom Branding
  1. Click on “Edit” against your community
  2. Now click on “Branding”, it will show the screen displayed in picture
  1. From here you can customize your headers and footers (formats are mentioned in picture) (which will be displayed on the native screens, and depends if you’ve applied on custom pages/tabs) and color theme to the community

Customize Login Page
  1. Click on “Edit” against your community
  2. Now click on “Login Page”, it will show the screen displayed in picture
  1. Now you can give your company logo in login page. Whenever user open your community link, then you can show your company logo in header and show your content in footer.
  2. If you need to completely change the login page to your visualforce page then we need to follow some more steps mentioned below :
(i) Create an apex class and visualforce page you want to show as your login page. Keep it simple for now.

Apex Class :
global with sharing class CustomLoginController 
  global String username {get; set;}
  global String password {get; set;}
  global CustomLoginController () {}
  global PageReference login() 
  return Site.login(username, password, null); 

Visualforce Page (please change this according to your need) :

Login to Community


(ii) Now go toSetup>Customize>Communities>Manage Comunities and click on force.com link as shown below

(iii) Now scroll down and click on edit "Site Visualforce Pages"

(iv) Now add the custom page you just created to "Enabled Visualforce Pages"

(v) Once saved, click on Edit as shown below :

(vi) Now add “CustomLogin” page as shown below. And save it.

(vii) Now click on "URL Redirect" as shown below :

(viii) Now add partial source URL (Ex. /support/login ) in Source URL textbox and partial target URL in (Ex. /support/CustomLogin) in Target URL textbox and click save.

Create New User
  1. Create a new account (Go to your org as internal user and then click on account tab and then new)
  2. Create a new contact record under newly created account (Go to the newly create account and then click on new on contact related list)
  3. Open contact record and click on “Manage External User” button (as shown in picture) and then click on “Enable Customer User” link, it will redirect you to user record
   4. When you click on Save button (on new user screen), please ensure that the current logged in user should have a role to create this new user otherwise it will give you error.

Publish It

Once you are done with everything and ready to use your community then you will click on publish as shown in picture

(From Setup, click Customize > Communities > Manage Communities. Click on edit button in the front of your community and then click on Publish button.)

Now you are all set to go. Get started with this hot topic, and please do share your thoughts or problem you may face.