+ Start a Discussion
Adam RycroftAdam Rycroft 

add a list view onto a record layout with VF

Hello,

I'm struggling with this. I have 2 custom objects, Invoice for donated goods and donated goods inventory. I want to display a list view from the donated goods inventory on a record for invoice for donated goods. Here's the code I have that keeps giving me an error. 
 
<apex:page standardController="Invoice_for_Donated_Goods__c" showHeader="true"> 
        <apex:enhancedList type="donated_goods_inventory__c" height="300" rowsPerPage="10" id="available_donated_goods" />
</apex:page>

Any help will be appreciated. Thanks!
Alain CabonAlain Cabon
Hi,

A list view or a related list?

<apex:relatedList list="donated_goods_inventories__r" />  

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_relatedList.htm
 
Adam RycroftAdam Rycroft
A list view, not a related list.