• Mostafa Matar 4
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
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:
 
<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 ?
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:
 
<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 ?