You need to sign in to do that
Don't have an account?

Visualforce page save button not saving new record
Hello,
I have a custom object, Survey, and I have created a visualforce page to show a customized UI. I successfully linked it to a custom button to be used for creating a new record and it displays correctly but hitting the save button doesn't save the record.
No errors are displayed instead, the page redirects to the previous page.
This is my code:
What could be the issue ?
I have a custom object, Survey, and I have created a visualforce page to show a customized UI. I successfully linked it to a custom button to be used for creating a new record and it displays correctly but hitting the save button doesn't save the record.
No errors are displayed instead, the page redirects to the previous page.
This is my code:
<apex:page standardController="Survey__c" recordSetVar="surveys"> <apex:pageMessages /> <apex:form > <apex:pageBlock title="Create a new survey"> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:pageBlockSection columns="1"> // The fields go here </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
What could be the issue ?
Can you please let us know the controller class ? Thanks !
All Answers
Can you please let us know the controller class ? Thanks !
If you are using <apex:inputField> tag and if reRenders are not handled properly, you might not be able to see the error message on the page.
Also, I would suggesst you to check the debug logs for any such error.
Let me know if that helped.