+ Start a Discussion

Parent Child Relationships.

Not sure if this is possible.


I have a custom object that is a has a master detail relationship to the account object.


Is it possible to create a form in the child object that changes the values in the fields on the parent? This code doesn't seeem to work.


<apex:pageBlockButtons><apex:commandButton value="Save" Action="{!save}" styleClass="button"/><apex:commandButton value="Edit" Action="{!edit}" styleClass="button"/></apex:pageBlockButtons>
<apex:outputField value="{!Account_Management__c.Account__r.Type}"/>

 any help would be amazing. Thanks


You can do this, but you'll have to save the values from the related account in a custom or extension controller, as the standard controller save only updates the main record, it doesn't traverse the object graph.