+ Start a Discussion
Hemalatha  ParuchuriHemalatha Paruchuri 

Hi , I am override Standrd Opportunity Object with Some New section ..but my save method is not working

Please see below code
<apex:page standardcontroller="Opportunity" extensions="TestOpportunityCLS">
<apex:form >
<apex:pageblock >
<apex:pageblockButtons >

<apex:commandButton value="Save" action="{!save}"/>

<apex:commandbutton value="Edit" action="{!Edit}"/>
<apex:commandbutton value="Cancel" action="{!Cancel}"/>
</apex:pageblockButtons>
<apex:pageblock title="Opportunity Edit" >
<apex:pageblockSection title="Opportunity Information">
<apex:outputField value="{!Opportunity.ownerId}"/>
<apex:inputField value="{!opportunity.AccountId}"/>
<apex:inputField value="{!opportunity.Name}"/>
<apex:inputField value="{!opportunity.Stagename}"/>
<apex:inputField value="{!opportunity.closedate}"/>
</apex:pageblockSection>
</apex:pageblock>
<apex:pageblocksection title="Select Products">
<apex:inputfield value="{!Opportunity.Pricebook2.Room__c}"/>
<apex:outputfield value="{!Opportunity.Product__r.Total_in_Units__c}"/>
<apex:inputfield value="{!Opportunity.Product__c }"/>
<apex:outputfield value="{!Opportunity.Product__r.UOM__c}"/>
<apex:inputfield value="{!Opportunity.Product__r.Length__c}"/>
<apex:inputfield value="{!Opportunity.Product__r.Width__c}"/>

<apex:outputfield value="{!Opportunity.Product__r.Cleaning_cost__c}"/>
<apex:outputfield value="{!Opportunity.Product__r.FS_Cost__c}"/>




</apex:pageblocksection>
</apex:pageblock>

  
</apex:form>


</apex:page>
Hemalatha  ParuchuriHemalatha Paruchuri
My save Button Is not working....REcord is saved ...but it show like edit mode
sfdc550sfdc550
​<apex:page standardController="Opportunity" sidebar="false">
  <apex:form >
    <apex:pageBlock title="My Content" mode="edit">
      <apex:pageBlockButtons >
        <apex:commandButton action="{!save}" value="Save"/>
      </apex:pageBlockButtons>
      <apex:pageBlockSection title="Opportunity Information 1" columns="2" collapsible="false">
            <apex:inputField value="{!opportunity.Name}"/>
            <apex:inputField value="{!opportunity.DeliveryInstallationStatus__c}"/>
            <apex:inputField value="{!opportunity.TrackingNumber__c}"/>
            <apex:inputField value="{!opportunity.CloseDate}"/>
            <apex:inputField value="{!opportunity.StageName}"/>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>


try this is working, it will redirect to record detail page once it is saved, it will not be in edit mode.
 
Hemalatha  ParuchuriHemalatha Paruchuri
But Its Not Working
Hemalatha  ParuchuriHemalatha Paruchuri
This record is saved in opportunity....But after save the record it display like edit page