+ Start a Discussion
Andrew Aldis 6Andrew Aldis 6 

Invalid field object for SObject object

I am trying to create a VF page with 2 page block tables both related to the same object.  I ultimately want to render the page as a PDF to print, but I can only seem to get one page block table to work.  When I add the second I get an Error stating Invalid field SFDC_Project__r for SObject Account, but SFDC_Project__r is a child object of Accounts.  The API name on the child object itself is SFDC_Project__c which gets the same error what am I doing wrong?

Here is my code.

<apex:page standardController="Account">
    <apex:pageBlock >
    
    <apex:pageBlockTable value="{!Account.Hardware_Information__r}" var="hardware">
      <apex:column value="{!hardware.Shipment_Type__c}"/>
      <apex:column value="{!hardware.Ship_Date__c}"/>
      <apex:column value="{!hardware.Item_Master__c}"/>
      <apex:column value="{!hardware.Sales_Order__c}"/>
      <apex:column value="{!hardware.Sales_Order_Line_Item__c}"/>
      <apex:column value="{!hardware.Serial_Number_Shipped_from_Denver_Whs__c}" />
      <apex:column value="{!hardware.Quantity_Ordered__c}"/>
      <apex:column value="{!hardware.Quantity_Shipped__c}"/>
      <apex:column value="{!hardware.Carrier_for_Shipment__c}"/>
      <apex:column value="{!hardware.Tracking_Number__c}"/>
      <apex:column value="{!hardware.Ship_to_Address__c}"/>
   </apex:pageBlockTable>
       <apex:pageBlockTable value="{!Account.SFDC_Project__r}" var="install">
       </apex:pageBlockTable>
</apex:pageBlock>

    </apex:page>
Best Answer chosen by Andrew Aldis 6
Neetu_BansalNeetu_Bansal
Hi Andrew,

It seems that the object API name is not correct. Can you please provide the screenshot of Account field on SFDC_Project__c object?

Thanks,
Neetu