Find your content:

Search form

You are here

Embedding a page layout into a VF page


Can we have a pagelayout of an object embedded into a Vf page? I have a Vf page which has captures some information, i also want to be able to create a new event in the same page.

I could have all the event fields in the Vfpage and create the event. Is there a simpler way of doing it like embedding the events page layout into the VF page.


Attribution to: Prady

Possible Suggestion/Solution #1

You can use an apex:iframe to embed content into a visualforce page

eg :

<apex:page standardController="Account">
<apex:outputText value="The Account Is  "/>
  <apex:iframe src="/{!Account.Id}"   />

Attribution to: techtrekker

Possible Suggestion/Solution #2

I believe you can just use the apex:detail tag. See

apex:detail uses the default page layout for the profile of the user viewing the page as well as the record type of the record being viewed.

<apex:page standardController="Account">
  Put the rest of your page content here...

Attribution to: DerekLansing
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content