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
CharlesDouCharlesDou 

Creating a VF with Opportunity page layout.

Hi all,

 

How can I create a VF page which looks exactly the same with the Opportunity edit page? Because I need to do some customizing on that edit page. Any ideas will be welcome. Thank you.

Ron ReedRon Reed

You'll want to start with something that looks like this:

 

<apex:page standardController="Opportunity">
    <apex:form>
        <apex:pageBlock title="Edit Opportunity">
            <apex:pageMessages/>
            <apex:pageBlockButtons>
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
            <apex:pageBlockSection>
                <apex:inputField value="{!opportunity.name}"/>
                <apex:inputField value="{!opportunity.amount}"/>
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

Saurabh DhobleSaurabh Dhoble

Yup, that's the way to go. Another place you can refer to here