How to create community site using salesforce


How to create community site using salesforce

Step:-1 Search Communities To Enable
From setup,enter communities setting in the quick search box.Then select communities setting

Step:-2 Enable Communities then save
Select a domain for your communities.then check Availability after check its show the message “success !Domain name available” .Then save

Step:-3 Create Communities
Click on the New Community button its redirect to lighting bolt where you chose the template

Step:-4 Choose one of the template Like
i.Customer Service (Napili)
ii.Customer Account Portal
Also, you can create your own template

Step:-5 Here i have choose sale –>partner central

Step:6 After chose the template. you need to click on the “Get Started ” button , Pass the name then click the create button

Its take few time to build

step:6 once its created its redirect to the community work space

step-7 Click on the builder to build publish the site.on the right corner after customization you need to publishing the site

Step:-8 After successfully published its sows like this


Navigate to lightning from visualforce page

On visualforce page you need to add below code.If you need to redirect to lightning page on button click or page load .You use below code

 //get record ID
        var recordid='{!$CurrentPage.parameters.Id}';//Its depend open your record id
if( (typeof sforce != 'undefined') && sforce && (!! ) {
                // Salesforce1 navigation(Lightning Experience)
            }, 10);

Create Hello World Lightning Component

Hello World Lightning Component

Step:-1: Login to Salesforce dev Org

Step:-2 Open Developer Console

Step:3 Create Lightning Component
File–>New–>Lightning Component

After Click on the lightning component, Enter Name and Description for the component.

Paste the below code over the component

<aura:component >
	<p> Hello World </p>

Also, you can add CSS on Click Style



Step:-3 Create Lightning Application page For test the Lightning Componenet
File–>New–>Lightning Application

After click on the Lightning Application, Enter Name and Description for the page

Step:-4 Use your created Component over lightning application page

<aura:application >

Paste the below code

Step:-5 preview the page on click preview button



salesforce lightning navigate to record

$A.get(“e.force:navigateToSObject”) help you to navigate the sobject record for more detail please check below example

Apex Controller Class

public with sharing class AccountsController {
public static list getAllAccounts()
return [select id,name,phone from account where phone!=null];


<aura:component implements="flexipage:availableForAllPageTypes" access="global" controller="AccountsController" >
	<aura:attribute name="accounts" type="list"></aura:attribute>
     <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    <aura:iteration var="account" items="{!v.accounts}">
        <lightning:card variant="Narrow" title="{!account.Name}">
        <aura:set attribute="actions">
            <lightning:button name="details" label="Details" onclick="{!c.goToRecord}"  />
        <aura:set attribute="footer">
            <lightning:badge label="{!account.Name}"/>
           <a onclick="{!c.goToRecord}">{!account.Name}</a> 

Controller JS

    doInit : function(component, event, helper) {
        var action=component.get("c.getAllAccounts");
            var state=response.getState();
    goToRecord:function(component, event, helper)
        var sobjectEvent=$A.get("e.force:navigateToSObject");
            "recordId": component.get("account.Id")


Made a lightning app using Lightning app builder to run it


How do I change the background theme in Lightning App Builder?

In Setup–>Themes and Branding in the Quick Find box, then select Themes and Branding, and select Hide.


ng-repeat load data but wont show until i click some button

ng-repeat load data but wont show until i click some button

Just apply






Unable to Generate a Temporary Class

This error occurs winter’15 release.when you integrate WSDL over .net application

Step 1: Open the wsdl file.

Step:2 Find ListViewRecord

  1. <complexType name=“ListViewRecord”>
  2.    <sequence>
  3.       <element name=“columns” type=“tns:ListViewRecordColumn” maxOccurs=“unbounded”/>
  4.    </sequence>
  5. </complexType>

Step 3: Add “<xsd:attribute name=”tmp” type=”xsd:string” />”.

Over this section
  1. <complexType name=“ListViewRecord”>
  2. <sequence>
  3. <element name=“columns” type=“tns:ListViewRecordColumn” maxOccurs=“unbounded”/>
  4. </sequence>
  5. <xsd:attribute name=“tmp” type=“xsd:string” />
  6. </complexType>

Step 4: Update the webservice.

Now build the application its working like champ.