+ Start a Discussion
Everton CP7Everton CP7 

Didn't saving

Hi there,

 

I created a page.

But when I click in the button to save. Tha page didn't save.

 

<apex:page standardController="case">
    <apex:form>
        <apex:sectionHeader title="Novo Chamado"/>
        <apex:pageBlock mode="edit">
<apex:pageBlockButtons location="bottom"> <apex:commandButton value="Criar Chamado" action="{!Save}"/> <apex:commandButton value="Cancelar" action="{!Cancel}" immediate="true"/> </apex:pageBlockButtons> <apex:pageBlockButtons location="top"> <apex:commandButton value="Criar Chamado" action="{!Save}"/> <apex:commandButton value="Cancelar" action="{!Cancel}" immediate="true"/> </apex:pageBlockButtons>
<apex:pageBlockSection columns="2" id="tipoderegistro" > <apex:pageBlockSectionItem > <apex:outputLabel value="Tipo de Registro"/> <apex:actionRegion > <apex:inputField value="{!case.RecordTypeId}"> <apex:actionSupport event="onchange" rerender="tipoderegistro"/> </apex:inputField> </apex:actionRegion> </apex:pageBlockSectionItem> <apex:outputLabel value="Motivo"> <apex:actionRegion > <apex:inputField value="{!case.motivo__c}"> <apex:actionSupport event="onchange" reRender="dados" /> </apex:inputField> </apex:actionRegion> </apex:outputLabel> </apex:pageBlockSection>
<apex:outputPanel id="dados"> <apex:pageBlockSection title="Cheque devolvido" rendered="{!case.motivo__c == 'Cheque devolvido'}"> <apex:inputfield value="{!case.dados_de_retorno__c}" required="true"/> </apex:pageBlockSection> </apex:outputPanel>
</apex:pageBlock> </apex:form> </apex:page>

 

I'm putting the entire code, cause I don't have any idea why my page didn't save.

If someone know how I do this, or a topic, a blog. Will be a great help for me.

 

Thanks,

Best Answer chosen by Admin (Salesforce Developers) 
SurekaSureka
Hi,

Try putting <apex:pageMessages/> in the code and check if there are any errors while saving. You might have missed filling mandatory fields or some other error might be there during the save.

Thanks

All Answers

SurekaSureka
Hi,

Try putting <apex:pageMessages/> in the code and check if there are any errors while saving. You might have missed filling mandatory fields or some other error might be there during the save.

Thanks
This was selected as the best answer
Everton CP7Everton CP7

Thank you so much.

 

I tought was some validation rules. 

But I never used <apex:pageMessages/>. Since today all my pages will have this.

 

Thanks again Sureka !!