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

page layout in visual force page

Hello  everyone,


Please any one tell me, Is it possible to embed page layout in visaul force page. I mean i have one page layout and i want it to embed it in visual force page i.e. when i open the page that page layout is called and opens.


If its possible then please tell me hows it possible.????



Thanks in Advance.


you can use <apex:detail/>, see docu, to include the standard display layout of an object.


Thanks for reply,



 Will you please any example code for the same. how should i use the standard apge layout in visual force page???????


see the visualforce developers guide:



<!-- 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:
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"/>


of course you can add other fields, text, etc. to the page before you call the detail page.