Find your content:

Search form

You are here

Embedding a page layout into a VF page

 
Share

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.

Thanks


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}"   />
</apex:page>

Attribution to: techtrekker

Possible Suggestion/Solution #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">
  <apex:detail/>
  Put the rest of your page content here...
</apex:page>

Attribution to: DerekLansing
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4691

My Block Status

My Block Content