You need to sign in to do that
Don't have an account?
ryan-david
VF page Save Button not saving and returning to page
Very much a newbie to code and this level of Admin as I have a helper who is much stronger than I. But he's unavailable due to illness. I have a VF page to access a field set to turn a contact into a sponsor, we're a NFP. But on clicking save nothing happens. The fields are not updated and it doesn't return to the main contact page layout. The cancel button works fine... Any help appreciated.
<apex:page standardcontroller="Contact" >
<apex:form >
<apex:pageBlock title="Convert_To_Sponsor" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:repeat value="{!$ObjectType.Contact.FieldSets.Convert_To_Sponsor }" var="field">
<apex:inputField value="{!Contact[field]}" />
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<apex:detail subject="{!$CurrentPage.parameters.cId}" title="false" relatedList="false" />
<apex:page standardcontroller="Contact" >
<apex:form >
<apex:pageBlock title="Convert_To_Sponsor" mode="edit">
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection >
<apex:repeat value="{!$ObjectType.Contact.FieldSets.Convert_To_Sponsor }" var="field">
<apex:inputField value="{!Contact[field]}" />
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<apex:detail subject="{!$CurrentPage.parameters.cId}" title="false" relatedList="false" />
Thx
All Answers
Did the page work before?
FIrst, this is not the complete page, it is missing code?
Second, how is this page launched? a button? something else?
Third, when you said nothing happens, what happens? really nothing? What does page look like after launched?
Last, I would estimate resolving this issue will take 10-15 minutes if I can see or have access to the environment.
Thx
ps. If you are interested about part-time professional services help, feel free to email me.
I made a button for the contact page which loads a VF page which is a field set above the usual contact fields. I enter some test data in some of the fields and click save. Firefox indicates something is happeneing on the page and when the "wheel" stops the fields are still visable and in the same position above the usual contact page fields. If I scroll down I see that none of the data has been transfered to the fields in the contact screen.
If I click the cancel botton the VF page closes and the screen returns to the usual contact page.
Thanks for your help
Thx
Ryan, since you are new to the Developer's Forum, here are some guidelines:
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
This will help keep the forum clean and help future users determine what answers are useful and what answer was the best in resolving the user's issue.
Thanks
Cya