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.


2 Answers 2


I believe you can just use the apex:detail tag. See http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_detail.htm

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

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}"   />

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .