+ Start a Discussion
Bob_zBob_z 

visualforce page not saving

I created a visualforce page for the opportunity object. I turned it into a force.com. My issue is when I open the visualforce add updates to any field and click the save button the record information doesnt change. I have the code below. If anyone could help me find a solution, i would appreciate it. 
 
<apex:page standardcontroller="Opportunity" showheader="false"   >



<style type="text/CSS">


body{
color:ffffff;
}

h2{
   font-size:14px; 
   font-family:Arial, Sans-Serif, Garamond;  
   border-bottom-width: 0px;
   border-bottom-style: solid;
   padding:13px,0px,13px,0px;
   
   color:#fff;
   
   
}

th{
   padding-top: 13px;
   margin-bottom: 25px;
}
   
td{
   padding-bottom: 10px;
}
div{
background-color:#000000;
font-color:#ffffff;
height:20px;
}

.title{
   font-size:20px; 
   font-family:Arial, Sans-Serif, Garamond;  
}
</style>


<apex:form >

           
<table align="center" style="text-align:center" width="400px" styleClass="hd">
    <tr ><td class="title">Request for Special Payment </td></tr><tr><td><apex:commandButton immediate="true" action="{!save}"  value="Save"/></td></tr></table>
   
        <table>
         <tr>
           <div> <h2>Opportunity Information</h2></div>
        </tr>
            <tr>
                <th>Date:</th> <th>Opportunity Name:</th>
            </tr>
            <tr>                 
                <td><apex:outputText value="{!Opportunity.LastModifiedDate}"/></td><td><apex:outputText value="{!Opportunity.Name} "/></td>
            </tr>



    </table>

    <table>
         <tr>
           <div> <h2>Terms Adjustment Information</h2></div>
        </tr>
            <tr>
                <th>Opportunity Account Address:</th>
            </tr>
            <tr>                 
                <td><apex:outputText value="{!Opportunity.Account.BillingStreet}"/><br /><apex:outputText value="{!Opportunity.Account.BillingCity}"/>,&nbsp;<apex:outputText value="{!Opportunity.Account.BillingState}"/>&nbsp;&nbsp;<apex:outputText value="{!Opportunity.Account.BillingPostalCode}"/></td>
            </tr>
            
            
            <tr>
                <th>Robot Model or Product Name:</th>
            </tr>
            <tr>                 
                <td><apex:outputText value="{!Opportunity.Robot_Model_or_Product_Name__c}"/></td>
            </tr>
            <tr>
                <th>Quoted Total Price:</th>
            </tr>
            <tr>                 
                <td><apex:outputText value="{!Opportunity.Total_Quoted_Amount__c}"/></td>
            </tr>
            <tr>
                <th>Required Payment Term:</th>
            </tr>
            <tr>                 
                <td><apex:outputText value="{!Opportunity.Required_Payment_Terms__c}"/></td>
            </tr>
            <tr>
                <th>Detailed Reason:</th>
            </tr>
            <tr>                 
                <td><apex:outputText value="{!Opportunity.Detailed_Reason__c}"/></td>
            </tr>



    </table>

    <table>
         <tr>
           <div> <h2>Special Instructions</h2></div>
        </tr>
            <tr>
                <th>Special Instructions</th></tr>
            <tr>                 
                <td><apex:outputText value="{!Opportunity.Special_Instructions__c}"/></td>
            </tr>



    </table>

    <table>
         <tr>
           <div> <h2>Requestor Information:</h2></div>
        </tr>
            <tr>
                <th>Requestor:</th> &nbsp;<th>Submitted Date: </th>
            </tr>
            <tr>                 
                <td><apex:outputText value="{!Opportunity.Request_Submitted_By__c}"/></td>&nbsp;&nbsp;<td><apex:outputText value="{!Opportunity.Date_Submitted__c}"/></td>
            </tr>

</table>

<table>
         <tr>
           <div> <h2>DNB Results</h2></div>
        </tr>
            <tr>
                <th>DNB Results:</th>
            </tr>
            <tr>                 
                <td><apex:inputText value="{!Opportunity.DNB_Results__c}" style="width: 300px; height: 30px" /></td>
            </tr>
            <tr>
                <th>Controller Approve Request:</th> 
            </tr>
            <tr>                 
                <td><apex:inputCheckbox value="{!Opportunity.Request_Submitted_By__c}"/></td>
            </tr>

           
            <tr>
                <th>Controller’s Comments:</th>
            </tr>
            <tr>                 
                <td><apex:inputTextarea value="{!Opportunity.Controller_s_Comments__c}" style="width: 400px; height: 150px" /></td>
            </tr>
 </table>
    
 </apex:form>
</apex:page>

 
Neetu_BansalNeetu_Bansal
Hello Bob,

In the below statement.
<apex:commandButton immediate="true" action="{!save}" value="Save"/>
You have put immediate = true, this is escaping if there are any issues, might be there are some issues with the field you are trying to save. Please try to remove this and try to save the record. If there are any issues, it will throw the error.

Thanks,
Neetu