I have a relatively simple VF page that is launched from a button on a custom object called 'Inclusion_detail__c. The page uses the standard Controller and is effectively a data entry form for specific fields which works perfectly from fields on the Inclusion_detail__c object. I want to extend this to add a field from the parent Contact record which is a master-detail relationship. The field renders perfectly, but when I press Save, the parent fields do not update. Can this be achieved with a standard controller or do I need an extension? Do I need to pass in the Contact parameter somewhere?
<apex:page standardController="Inclusion_Details__c">
<apex:pageMessages />
<h1 style="font-size:200%;"><font color="#0000ff" text-align="center"><b>Hello {!$User.FirstName}</b></font></h1> Please enter the MASI infromation for <b> {!Inclusion_Details__c.Contact__r.Name} </b><br></br><br></br>
<apex:form >
<apex:pageBlock title="Enter MASI">
<apex:pageBlockButtons location="bottom">
<apex:commandButton value="Save" action="{!save}"/>
<apex:commandButton value="Cancel" action="{!cancel}"/>
</apex:pageBlockButtons>
<apex:pageblockSection title="Consent" >
<apex:inputfield value="{!Inclusion_Details__c.Contact__r.Agree_to_main_consent_statement__c}"/>
<apex:inputfield value="{!Inclusion_Details__c.Contact__r.Team__c}"/>
</apex:pageblockSection>
<apex:pageblockSection title="Legal Guardian" >
<apex:inputText value="{!Inclusion_Details__c.Are_you_the_legal_guardian__c}"/>
<apex:inputField value="{!Inclusion_Details__c.Name_of_legal_guardian__c}"/>
<apex:inputField value="{!Inclusion_Details__c.Address_of_legal_guardian__c}"/>
<apex:inputField value="{!Inclusion_Details__c.Legal_guardian_call_back_time__c}"/>
<apex:inputField value="{!Inclusion_Details__c.Further_info_on_legal_guardian__c}"/>
<apex:inputField value="{!Inclusion_Details__c.Legal_Guardian_Telephone__c}"/>
</apex:pageblockSection>
</apex:pageBlock>
</apex:form>
Thanks