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
Tim StinsonTim Stinson 

How to create a replica of account details page using visualforce

I'm trying to find out how to include the standard object page design (header) in a custom visualforce page.  Simply put, I want to know what code is necessary to render the section(s) called out in red in the attached image.User-added image
Himanshu ParasharHimanshu Parashar
Hi TIm,

You can use following code to repliate that. Social profile viewer tag does that magic.
<apex:page standardController="account">
<social:profileViewer entityId="{!Account.id}" ></social:profileViewer>
 <apex:detail subject="{!Account}" relatedList="true"/>
</apex:page>

Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
Tim StinsonTim Stinson
That's very close to what I was looking for.  I added a title="false" property to the <apex:detail> component to keep the name of the Account from appearing twice in the header area.  But when I did that, the Feed / Topics bar disappeared.  How can I get that bar to show up UNDER the name of the Account and the Twitter and Facebook icons?
User-added image
Himanshu ParasharHimanshu Parashar
Hi TIm,

You need to add topics widget and chatter feed seperatly as shown below
 
<apex:page standardController="account">

<social:profileViewer entityId="{!Account.id}" ></social:profileViewer>
<br/><br/><br/><br/><br/><br/>
<topics:widget entity="{!Account.id}" renderStyle="simple" />
<chatter:feed entityId="{!Account.id}"/>

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

Though there are some style limitations with topics widget. You can't get whole horizontal bar but it fullfill functionality.



Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant

P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
 
Pramod Kumar 194Pramod Kumar 194

User-added image


Getting the same issue while using <apex:detail relatedList="false"/> tag in visualforce page so unable to see account correct detail layout on page, if any has any details about it so reply me asap. It should be standard like the below image.

 

User-added image