You need to sign in to do that
Don't have an account?
carlsosg
Embedding VisualForce Page in Contact
I'm trying to figure out how to make it possible to include several Account fields on a Contact object - and make it possible to edit those fields (so the changes appear at the Account level also).
I've thought about creating a VisualForce page containing the Account fields, and embedding this in the Contact page layout - but that's as far as I've gotten.
Does anyone else have experience embedding VF page in a Contact - so that the fields can be edited at the Account level also?
Hi,
the best way to achieve that is by using a VF page with a custom controller. in this way, you can create and edit multiple objects in the same page.
in the following example, acount and contact fields are edited on the same page
Vf page
Controller:
Thank you for your response. Is there a way to do this from the main Contact page - by including a VF page on the standard layout?
Yes, you can do that. but the problem is that you cannot save account information from contact save button.
But if you want to see the account information, you can do that by creating a vf page on contact and calling its account field by using code like this
<Apex:inputField value="{!contact.account.accountnumber}" />
I'm sorry but this still doesn't seem to work. Could you please help me with details for a controller that would work to display and update Account fields from a VF page embedded in a standard Contact page layout?
hi,
Like i said, your requirement is only possible if there are two save buttons in the contact page. one will save account info, and other contact info. if thats fine with you, i can help you wid the code
Yes - I understand. That is an acceptable solution. For some reason I can't get a standard controller to work with the embedded VF page.