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
stpetecrmstpetecrm 

Creating a tab or a related list of a custom object

I am trying to create a tab to represent the related list of my quotes custom object. Keep ketting an exception that tells me that this is incorrect.
 
Quotes Object: Quotes__c has a lookup relationship to Opportunity
 
Here's my code:
 

<apex:page standardController="Opportunity"showHeader="true"tabStyle="opportunity">

<apex:tabPanel switchType="client"selectedTab=""id="OpportunityTabPanel"tabClass="activeTab"inactiveTabClass="inactiveTab">

<style>

.activeTab{background-color:#236FBD;color:white;background-image:none}

.inactiveTab{background-color:lightgrey;color:black;background-image:none}

</style>

<apex:tab label="Details"name="OppDetails"id="tabdetails">

<apex:detail relatedList="false"title="true"/>

</apex:tab>

<apex:tab label="Products"name="Products"id="tabOpp">

<apex:relatedList subject="{!opportunity}" list="opportunitylineitems"/>

</apex:tab>

<apex:tab label="Quotes"name="Quotes"id="tabOpenAct">

<apex:relatedList subject="{!opportunity}"list="quotes"/>

</apex:tab>

<apex:tab label="OpenActivities"name="OpenActivities"id="tabOpenAct">

<apex:relatedList subject="{!opportunity}"list="OpenActivities"/>

</apex:tab>

</apex:tabPanel>

</apex:page>

 

Thanks

aballardaballard

You need to specify the "relationship name" as the list=... attribute for a custom relationship.   It is probably quotes__r (the default), if you didn't set it to anything different in the custom field definition.

 

stpetecrmstpetecrm
that did it...
 
thanks