• metal-head
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies

Hi Gurus,

 

I am facing problems with overriding "new" button.

 

We are using Professiona Edition. We needed a visualforce page in place of standard "new page".

 

So we created one, and replaced it. but when I am hitting save button, it has standard save function "{!save}", the new record is not being created and it is staying on the same page.

 

I tried to find out if PE allows such thing, and found out that it does allow.

 

Can you guys help me out.

 

i am trying to override standard oppotunity. the code is like this...

<apex:page standardController="opportunity" >
 
 <apex:form id="form00"  title="New Opportunity">
   <apex:pageBlock id="block01">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value=" Save "></apex:commandButton>
                <apex:commandButton action="{!cancel}" value=" Cancel "></apex:commandButton>
            </apex:pageBlockButtons>
       
       <apex:pageBlockSection id="sec01" title="Opportunity Details" columns="2">
           
           <apex:inputField label="Deal Size" value="{!opportunity.Amount}"/>                      
           <apex:inputField value="{!opportunity.owner.Name} "/>
           <apex:inputField value="{!opportunity.Name} "/>                      
           <apex:inputField value="{!opportunity.Account.Name} "/>
           <apex:inputField value="{!opportunity.StageName}"/>                      
           <apex:inputField value="{!opportunity.Probability}"/>
           <apex:inputField value="{!opportunity.ExpectedRevenue}"/>
           <apex:inputField value="{!opportunity.ForecastCategoryName}" style="width:130px"/>
           <apex:inputField value="{!opportunity.IsPrivate}"/>
           <apex:inputField value="{!opportunity.LeadSource}"/>
           <apex:inputField value="{!opportunity.NextStep}"/>
           <apex:inputField value="{!opportunity.Description}"/>
           
           <apex:inputField value="{!opportunity.type}" style="width:130px"/>
       </apex:pageblocksection>  
        
        
   </apex:pageBlock>
 </apex:form>

</apex:page>

 

 

 

 

 

 

Hi Gurus,

 

I am facing problems with overriding "new" button.

 

We are using Professiona Edition. We needed a visualforce page in place of standard "new page".

 

So we created one, and replaced it. but when I am hitting save button, it has standard save function "{!save}", the new record is not being created and it is staying on the same page.

 

I tried to find out if PE allows such thing, and found out that it does allow.

 

Can you guys help me out.

 

i am trying to override standard oppotunity. the code is like this...

<apex:page standardController="opportunity" >
 
 <apex:form id="form00"  title="New Opportunity">
   <apex:pageBlock id="block01">
            <apex:pageBlockButtons >
                <apex:commandButton action="{!save}" value=" Save "></apex:commandButton>
                <apex:commandButton action="{!cancel}" value=" Cancel "></apex:commandButton>
            </apex:pageBlockButtons>
       
       <apex:pageBlockSection id="sec01" title="Opportunity Details" columns="2">
           
           <apex:inputField label="Deal Size" value="{!opportunity.Amount}"/>                      
           <apex:inputField value="{!opportunity.owner.Name} "/>
           <apex:inputField value="{!opportunity.Name} "/>                      
           <apex:inputField value="{!opportunity.Account.Name} "/>
           <apex:inputField value="{!opportunity.StageName}"/>                      
           <apex:inputField value="{!opportunity.Probability}"/>
           <apex:inputField value="{!opportunity.ExpectedRevenue}"/>
           <apex:inputField value="{!opportunity.ForecastCategoryName}" style="width:130px"/>
           <apex:inputField value="{!opportunity.IsPrivate}"/>
           <apex:inputField value="{!opportunity.LeadSource}"/>
           <apex:inputField value="{!opportunity.NextStep}"/>
           <apex:inputField value="{!opportunity.Description}"/>
           
           <apex:inputField value="{!opportunity.type}" style="width:130px"/>
       </apex:pageblocksection>  
        
        
   </apex:pageBlock>
 </apex:form>

</apex:page>