function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Harish Sridhar 10Harish Sridhar 10 

Need to make the lightning component to look like a standard Account layout if opened from a mobile.

Hello,

I am actually in a process of building lightning components for Salesforce App(For Mobile), I need to design the UI same as if like it look for Standard object(Accounts,Contacts) if opened via mobile App including the looks of related list. Should look like below.User-added image
User-added image
User-added image
 
Ravi Dutt SharmaRavi Dutt Sharma
Hi Harish,

For the detail page look, you can use something like below:
 
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
	<lightning:recordViewForm recordId="0016F00002RHxobQAD" objectApiName="Account">
        <lightning:outputField fieldName="Name" />
    </lightning:recordViewForm>
</aura:component>

This will give you a read only form. If you want it to be editable, you can use lightning:recordEditForm like below:
 
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" access="global" >
	<lightning:recordEditForm recordId="0016F00002RHxobQAD" objectApiName="Account">
        <lightning:inputField fieldName="Name" />
    </lightning:recordEditForm>
</aura:component>

Please mark it as the best answer if this resolves your issue. Thanks.