+ Start a Discussion
Ashok S 7Ashok S 7 

How to create custom record detail page

Hai,
How create custo record detail page by using standard controller (or) custom controller
here my vf page
<apex:page sidebar="false" standardController="Employee_Information__c" >
<apex:form >
<apex:pageBlock title="Record Detail Page">
<apex:pageBlockSection title="Record Page">
<p> First Name  :::   {!Employee_Information__c.First_Name__c} Employee_Information__c</p>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

please help me any one
Muthuraj TMuthuraj T
<!-- For this example to render properly, you must associate the Visualforce page 
with a valid account record in the URL. 
For example, if 001D000000IRt53 is the account ID, the resulting URL should be: 
https://Salesforce_instance/apex/myPage?id=001D000000IRt53
See the Visualforce Developer's Guide Quick Start Tutorial for more information. -->
   
<apex:page standardController="Account">
   <apex:detail subject="{!account.ownerId}" relatedList="false" title="false"/> 
</apex:page>


Use apex:detail tag to implement this.

Reference : 
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_detail.htm

 

<apex:page sidebar="false" standardController="Employee_Information__c" >
<apex:form >
<apex:pageBlock title="Record Detail Page">
<apex:detail subject="{!Employee_Information__c.Id}" relatedList="false" title="false"/>
</apex:pageBlock>
</apex:form>
</apex:page>
Abhishek BansalAbhishek Bansal
You can easily create your custom Detail page with below three lines :
 
<apex:page sidebar="false" standardController="Employee_Information__c" >
    <apex:detail/>
</apex:page>

There are various attributes supported by detail tag which you can find at below link :
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_detail.htm

Please make sure that after creating this custom VF page you should override your standard VIEW button with this VF page.

Regards,
Abhishek
Karleen MendozaKarleen Mendoza
Hi all, I am trying to figure this code out. I'm not too familar with apex. Is this how the code should be written??
 
<apex:page sidebar="false" standardController="Tasks_2_0_Assignment__c" >
<apex:form >
<apex:pageBlock title="Record Detail Page">
<apex:detail subject="{!Tasks_2_0_Assignment__c.https://cs91.salesforce.com/a382F0000001HRW}" relatedList="false" title="false"/>
</apex:pageBlock>
</apex:form>
</apex:page>