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
AmbigaRamAmbigaRam 

how to show a record using VF in detail?

Hi ,

 

I want to create the page which shows the saved  record in detail. 

 

Can Any one help for this?

 

Thanks&Regards.,

Ambiga.

Best Answer chosen by Admin (Salesforce Developers) 
Sonam_SFDCSonam_SFDC

You can use <apex:detail> to get the layout of standard object on a VF page.

<apex:page standardcontroller ="Contact">
<apex:detail subject="{!Contact.Id}"/>
</apex:page>

All Answers

Sonam_SFDCSonam_SFDC

You can use <apex:detail> to get the layout of standard object on a VF page.

<apex:page standardcontroller ="Contact">
<apex:detail subject="{!Contact.Id}"/>
</apex:page>
This was selected as the best answer
AmbigaRamAmbigaRam

Thank you Sonam,

 

But I just want to show only specific field in the record using VF .

 

Can you please help for this.

 

 

Regards,

Ambiga

Mohith Kumar ShrivastavaMohith Kumar Shrivastava

You will need standard controller to do this .

 

The best approach to do this will be using field sets and alsong with field sets using standard controller of the salesforce

 

http://www.salesforce.com/us/developer/docs/pages/Content/pages_dynamic_vf_field_sets.htm

 

Use the above to understand more on fieldsets and if you are using an edit page then use second document in above link.

 

Hope this helps you