• Gavin Brown 7
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello,

I am having issues creating a table of related record for a custom object. I have a custom object 'Equipment Library' with a child custom object 'Equipment Library Item' which in turn had a field called 'Manufacturer'. I am able to create a table that populates with the related child objects and shows the name of each but when I include the Manufacturer field I get the following error: Invalid field Manufacturer for SObject Equipment_Library_Item__c

Can someone help?

I have read through similar questions and cant figure it out! Ive tried various endings for the Manufacturer field too and it still wont work (e.g. Manufacturer__c, Manufacturer_r, Manufacturers). My code is shown below:

<apex:page standardController="Equipment_Library__c" standardStylesheets="false" sidebar="false" showHeader="false">
    
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">    
<apex:stylesheet value="{!URLFOR($Resource.SLDS214_Rev2, 'assets/styles/salesforce-lightning-design-system-vf.min.css')}" />
<div class="SLDS214_scoping">
    <apex:dataTable  value="{!Equipment_Library__c.Equipment_Library_Items__r}" var="record" styleClass="slds-table slds-table--bordered slds-table--striped">
        <apex:column headerValue="Item Name" value="{!record.Name}"/>
        <apex:column headerValue="Item Name" value="{!record.Manufacturer}"/>
    </apex:dataTable>
</div>   
</html>
</apex:page>
Hello,

I am having issues creating a table of related record for a custom object. I have a custom object 'Equipment Library' with a child custom object 'Equipment Library Item' which in turn had a field called 'Manufacturer'. I am able to create a table that populates with the related child objects and shows the name of each but when I include the Manufacturer field I get the following error: Invalid field Manufacturer for SObject Equipment_Library_Item__c

Can someone help?

I have read through similar questions and cant figure it out! Ive tried various endings for the Manufacturer field too and it still wont work (e.g. Manufacturer__c, Manufacturer_r, Manufacturers). My code is shown below:

<apex:page standardController="Equipment_Library__c" standardStylesheets="false" sidebar="false" showHeader="false">
    
<html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">    
<apex:stylesheet value="{!URLFOR($Resource.SLDS214_Rev2, 'assets/styles/salesforce-lightning-design-system-vf.min.css')}" />
<div class="SLDS214_scoping">
    <apex:dataTable  value="{!Equipment_Library__c.Equipment_Library_Items__r}" var="record" styleClass="slds-table slds-table--bordered slds-table--striped">
        <apex:column headerValue="Item Name" value="{!record.Name}"/>
        <apex:column headerValue="Item Name" value="{!record.Manufacturer}"/>
    </apex:dataTable>
</div>   
</html>
</apex:page>