You need to sign in to do that
Don't have an account?
Nick D'Addario
Visualforce Page on Opportunity to Update Account Fields
Hi Guys,
I'm trying to build a Visualforce page on the opportunity record that allows users to update a few fields on the parent account. I have built the visualforce page, but can't get the newly input values to save back to the account. I'm fairly sure that Opportunity should be the standard controller and I'll need an extension. That's the part I'm having some trouble on.
Can someone point me in the right direction on how I'd accomplish this?
Thanks,
Nick
I'm trying to build a Visualforce page on the opportunity record that allows users to update a few fields on the parent account. I have built the visualforce page, but can't get the newly input values to save back to the account. I'm fairly sure that Opportunity should be the standard controller and I'll need an extension. That's the part I'm having some trouble on.
Can someone point me in the right direction on how I'd accomplish this?
Thanks,
Nick
All Answers
Please make use of the below code...
VF Page ..
Controller
Hope this helps ...!!
Please mark as best answer if the above helps...!!!
Thanks so much for your help. I gave your code a try and it displays the fields exactly as it should (I did have to change the way the fields were referenced in the Visualforce Page). However, when I click "Account Save", it doesn't save back to the account. The visualforce page refreshes and has the new inputs that I just entered, but it doesn't appear to be saving back to the account.
Thanks,
Nick
<apex:pageMessages/> with <apex:pageMessage detail="{!errormessage}" severity="error"/>
find the updated controller. So from this we can come to know the actual error message from VF page..
Please let me know how it goes on ...may be some validations on Account blocking it.
The opportunity I'm testing with does have an account associated with it already.
Upon saving, the visualforce page looks like it refreshes and that's it,
Hope the above answers your question.Please let me know,If you have any issues.
Please mark as best answer if the above helps ..!!!