I want to display my custom account detail page in salesforce lightning. As I am new to salesforce lightning experience, can somebody please help me to achieve this thing,also the steps to be followed? Code for page:

<apex:page standardController="Account">    
<apex:detail subject="{!account.ownerId}" relatedList="true" title="false"/> 

2 Answers 2


I would recommend you look at the 'Build a Lightning App with the Lightning Design System' Trailhead project which walks through all the steps in detail.

Specifically, refer to the last step - 'Build the AccountList Component' which builds out an Account Listing. Sample component code

<aura:component controller="AccountsController">
   <aura:attribute name="accounts" type="List" />
   <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
   <!-- Use the Apex model and controller to fetch server side data -->
   <table class="slds-table slds-table--bordered slds-table--striped">
           <th scope="col"><span class="slds-truncate">ID</span></th>
           <th scope="col"><span class="slds-truncate">Name</span></th>
           <th scope="col"><span class="slds-truncate">Type</span></th>
           <th scope="col"><span class="slds-truncate">Number Of Employees</span></th>
           <th scope="col"><span class="slds-truncate">Ticker Symbol</span></th>
           <th scope="col"><span class="slds-truncate">Phone</span></th>
           <th scope="col"><span class="slds-truncate">Details</span></th>  
        <aura:iteration items="{!v.accounts}" var="account">
              <c:button class="slds-button slds-button--neutral"
                 svgClass="slds-icon slds-icon-text-default"

Refer to the provided link for complete source code.


There is another component force:recordView instead of apex:detail in lightning:

<force:recordView recordId="{!v.file.id}" type="FULL"/>

You can see documantation here: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_force_recordView.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .