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
s-Forces-Force 

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.

MarceldeBMarceldeB

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

s-Forces-Force

Thanks for reply,

 

 

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

MarceldeBMarceldeB

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:
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>

 

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