+ Start a Discussion
Mani Cube84Mani Cube84 

How to display the records using <apex:detail> component in visualforce page

We have a client, they uses salesforce recently, Someone makes Personal Account Enabled in their Org, so if we enabled then we have no rite to disable it.And the OWD for contact appears as controlled by parent, we are unable to make and changes for it to make as private, so that if we want to share any records we can go through sharing rules, because of OWD-controlled by parent, sharing for contact is not visible.  We have tried to workout with Triggers as well but no use of it. 

I referred alot to fix this issue, atlast i found one info that we can achieve itby creating the Visualforce Page and also by using extension along with <apex:detail> tag.   can anyone help me out how to use all this and fix the issue.

Thanks in advance for the response.
Rahul KumarRahul Kumar (Salesforce Developers) 
Hi Mani,
How does <apex:detail> work?
<apex:page standardController="account" recordSetVar="accounts" sidebar="false" showHeader="false">
    <apex:panelGrid columns="2">
        <apex:form >
                <apex:pageBlockTable value="{!accounts}" var="a">
                    <apex:column headerValue="Name" >
                        <apex:commandLink value="{!a.name}" reRender="out">
                            <apex:param name="id" value="{!a.id}"/>
        <apex:outputPanel id="out">
            <apex:detail subject="{!$CurrentPage.parameters.id}" relatedList="false" title="false"/> 
hope it helps.

Please mark it as best answer if the information is informative.

Rahul Kumar