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
vin_devvin_dev 

Generating visualforce page based on Edit Page Layout of an Object

Hi,

 

I need to create a visual force which is reflected by the Edit Page Layout of an Object.

 

I am trying to find a solution.Help me to find a solution

 

Thanks in advance 

 

 

Achilles21Achilles21

Can you be more specific about your req? Do you want a VF Page that would reflect the Edit page layout for an object?

vin_devvin_dev

yes, you are correct.VF page need to be generated that would be similar to the edit page layout of an object 

Achilles21Achilles21

You can use something like this:

You can use tags like dataTable or PageBlockTable that would give you a nice look and feel.

 

<apex:page standardController="Case" extensions="CaseExtension" >
<apex:sectionHeader title="My Cases" subtitle="Here's How your Page will Look Like"/>
   <apex:form >
      <b>Subject</b> <apex:inputField value="{!cs.Subject}" />
    </apex:form>
    
 </apex:page>

 

public class CaseExtension{ 

    Case cs;
    
    public CaseExtension(ApexPages.StandardController controller) 
    {
       
    }
    
    public Case getCS()
    {
        return cs;
    }
}

 

vin_devvin_dev

Thanks for responding, I will try it 

Kamatchi Devi RKamatchi Devi R

Using field sets you can make the field as per the edit page to be reflected in VF pages.

Only the controller used to synchronise the sets field to get reflected there in VF page

 

Try it out...!

Bhawani SharmaBhawani Sharma
If you want page same like as standard edit page, then why do you want it as VF page. Is there any issue in using the standard page?