You need to sign in to do that
Don't have an account?
Display the Opportunity Contact Role for one Contact
I would like to traverse the relationship between an Opportunity and the ContactRole related list. We only choose one contact for each Opportunity, so there's no need to filter a sub-query. We are rendering a VisualForce page as a PDF, so the intention is to use <apex:outputField value="{!Opportunity ..." - dot notation. The Opportunity is the StandardController. Can a related list be referenced? (<apex:relatedList list="Contacts" ...) This is my second day trying to drink from a fire hose.(I'm getting bloated!) Thank you. Are there any good books to start from ground zero?
[select id, (select id, name from opportunityContactRole) from Opportunity where id = :oppId]
and add the opportunitycontactrole in a <apex:repeat> tag to show opp.opportunityContactRole.Name
OR
Write a trigger on oppContact role to populate a field on opportunity, this way you can directly use it in a Visual force page
Ta
Vish