function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
aka_floaka_flo 

URGENT HELP NEEDED -- " not a valid child relationship name for entity"

I have created a page using the following code.  For some reason, I can't get this error message to go away.  The Proposal and Line Items have a master-detail relationship as shown below. 

 

Can anyone help me?  I desperately need to get this project done, but doesn't help if I can't get display the line items on the proposal page.  Thanks!

 

 

'Proposal Line Items' is not a valid child relationship name for entity Proposal"

 

<apex:page StandardController="Proposal__c" tabstyle="Contact">
    <apex:form >
        <apex:pageBlock title="Proposal Details">
           <apex:pageBlockButtons >
               <apex:commandButton action="{!edit}" value="Edit"/>
               <apex:commandButton action="{!delete}" value="Delete"/>
           </apex:pageBlockButtons>
           <apex:pageBlockSection columns="2">
                <apex:outputField value="{!Proposal__c.Name}"/>
                <apex:outputField value="{!Proposal__c.Opportunity__c}"/>
                <apex:outputField value="{!Proposal__c.Scope__c}"/>
                <apex:outputField value="{!Proposal__c.Launch_Model__c}"/>
                <apex:outputField value="{!Proposal__c.Scope_Scale_of_Implementation__c}"/>
           </apex:pageBlockSection>
           <apex:pageBlockSection title="Site Equivalents">
           <apex:panelGrid columns="5" width="800px" cellspacing="10px">               

                <apex:outputText value="# of Employees" id="EEs"/>
                <apex:outputText value="Heavy - 1" id="Heavy"/>
                <apex:outputText value="Medium - 2" id="Medium"/>
                <apex:outputText value="Light - 3" id="Light"/>
                <apex:outputText value="Office - 4" id="Office"/>
               
                <apex:outputText value="< 10" id="lessthan10"/>
                <apex:outputField value="{!Proposal__c.Manufacturing__c}"/>
                <apex:outputField value="{!Proposal__c.Medium_Mfg_10_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Light_Mfg_10_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Office_10_EEs__c}"/>

                <apex:outputText value="10 - 49" id="ten49"/>
                <apex:outputField value="{!Proposal__c.Mfg_10_50_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Medium_Mfg_10_50_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Light_Mfg_10_49_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Office_10_50_EEs__c}"/>

                <apex:outputText value=" 50 - 149" id="fifty149"/>
                <apex:outputField value="{!Proposal__c.Mfg_51_150__c}"/>
                <apex:outputField value="{!Proposal__c.Medium_Mfg_50_149_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Light_Mfg_50_149_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Office_51_150_EEs__c}"/>

                <apex:outputText value=" 150 - 499" id="onefifty499"/>
                <apex:outputField value="{!Proposal__c.Mfg_151_500_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Medium_Mfg_150_499_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Light_Mfg_150_499_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Office_151_500_EEs__c}"/>

                <apex:outputText value=" 500 - 1500" id="five1500"/>
                <apex:outputField value="{!Proposal__c.Mfg_501_1500_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Medium_Mfg_500_1499__c}"/>
                <apex:outputField value="{!Proposal__c.Light_Mfg_500_1500_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Office_501_1500_EEs__c}"/>

                <apex:outputText value=" > 1500" id="greater"/>
                <apex:outputField value="{!Proposal__c.Mfg_1500_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Medium_Mfg_1500_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Light_Mfg_1500_EEs__c}"/>
                <apex:outputField value="{!Proposal__c.Office_1500_EEs__c}"/>
                </apex:panelGrid>
           </apex:pageBlockSection>
            <apex:pageBlockSection >
                <apex:outputField value="{!Proposal__c.Total_of_Sites__c}"/>
                <apex:outputField value="{!Proposal__c.Calculated_Site_Equivalents__c}"/>              
            </apex:pageBlockSection>
       </apex:pageBlock>
    </apex:form>
        <apex:relatedList subject="{!Proposal__c}" list="Proposal Line Items"/>
 </apex:page>

 

Custom Field Definition Detail 
Field Information
Field LabelProposalObject NameLine Item
Field NameProposalData TypeMaster-Detail
API NameProposal__c  
Description 
Help Text 
    
Master-Detail Options
Related ToProposalChild Relationship NameProposal_Line_Items
Related List LabelProposal Line Items
Sharing SettingRead/Write. Allows users with at least Read/Write access to the Master record to create, edit, or delete related Detail records.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Chamil MadusankaChamil Madusanka

replace

<apex:relatedList subject="{!Proposal__c}" list="Proposal Line Items"/>

By

 

<apex:relatedList subject="{!Proposal__c}" list="Proposal_Line_Items__r"/>

 If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

All Answers

Chamil MadusankaChamil Madusanka

replace

<apex:relatedList subject="{!Proposal__c}" list="Proposal Line Items"/>

By

 

<apex:relatedList subject="{!Proposal__c}" list="Proposal_Line_Items__r"/>

 If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.

This was selected as the best answer
aka_floaka_flo

That fixed it!!  Thanks!  You are awesome.