+ Start a Discussion
Gavin Brown 7Gavin Brown 7 

Invalid Field For SObject Error


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}"/>
Hope E.Hope E.
Hello Gavin,

probebly you should use Manufacturer__c instead.

Kind regards,
Gavin Brown 7Gavin Brown 7
Hi Arezou, thanks for your reply!

I have tried that too and its not working either. I do get a different error message however: Invalid field Manufacturer__c for SObject Equipment_Library__c

(error reference parents object instead of child)

Any other ideas?