apex code - Salesforce visualforce save button doesnt save -


i new salesforce environment , trying achieve simple thing. want create new lead screen custom lead questions , save lead.

i created apex form, overridden new lead button page, when press save button on page, dont error doesnt save lead. cancel button seems working.

do need write custom code save or apex:pageblockbuttons default action should work ?

i show short snippet of code, of setting input fields

<apex:form id="mysection">     <apex:pageblock title="new lead: {!lead.name}">          <apex:pageblocksection title="lead information" columns="1" >             <apex:inputfield value="{!lead.firstname}" taborderhint="1"/>             <apex:inputfield value="{!lead.lastname}" taborderhint="2"/> <!--  other fields skipped  -->             <apex:inputfield value="{!lead.project_value__c}" taborderhint="3"/>           </apex:pageblocksection>         <apex:pageblockbuttons >             <apex:commandbutton action="{!save}" value="save"/>             <apex:commandbutton action="{!cancel}" value="cancel" immediate="true"/>         </apex:pageblockbuttons>                </apex:pageblock> </apex:form> 

i found solution, not related apex itself, more 1 custom field mandatory not on page. decided leave answer here, because while trying find solution issue, discovered command shows why input form failed.

<apex:pagemessages /> 

maybe common knowledge visualforce, apex users, me helpful tool , thats why decided leave in answer, if have similar issue remember add line.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -