You need to sign in to do that
Don't have an account?
Dragon Slayer
Text field not displaying on Visualforce page
I am trying to display a text field ,'RESOURCE', from the master object (this text field is manually entered on the VF page associated to the master object). This needs to be displayed on another VF page associated to the child object. So, I have written a code like this on the VF page(related to child object):
<apex:pageBlockSection id="DetailsSection" columns="1"><apex:outputField id="Resource" value="{!Child_Object__c.Master_Object__r.Resource__c}"/></apex:pageBlockSection>
But, when I open the VF page, the value doesn't appear however once I save the page after entering the rest of the details and reopen it the value appears.
<apex:pageBlockSection id="DetailsSection" columns="1"><apex:outputField id="Resource" value="{!Child_Object__c.Master_Object__r.Resource__c}"/></apex:pageBlockSection>
But, when I open the VF page, the value doesn't appear however once I save the page after entering the rest of the details and reopen it the value appears.
<apex:pageBlockSection id="DetailsSection" columns="1"><apex:outputField id="MasterName" value="{!Child_Object__c.Master_Object__r}"/></apex:pageBlockSection>
I have a button which creates a child object and get the parent object's record id but no other fields from the parent make it through.