Skip to main content
Chad Ritchie (Wells Fargo) a posé une question dans #Visualforce
Hey guys, let's say contact is my primary object, but I then do a related lookup on Opportunity, which I have working, how would I do a lookup on a related object to Opportunity, let's call it Closings, can that be done? Here's my code: (The first bold part works, but the second doesn't)

THANKS!!

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<messaging:emailTemplate subject="TEST" recipientType="Contact" relatedToType="Contact" >

<messaging:htmlEmailBody >

<html>

<style type="text/css">

body {font-family: arial; size: 12pt;}

</style>

<body>

Dear {!relatedTo.Name},

<br>

<br>

<apex:repeat var="opp" value="{!relatedTo.Opportunities__r}">

    <table border="0">

           <tr>

               <td>{!opp.Name}</td>

           </tr>

    </table>

</apex:repeat>

<apex:repeat var="cls" value="{!relatedTo.Opportunities__r.Closings__r}">

    <table border="0">

           <tr>

               <td>{!cls.Name}</td>

           </tr>

    </table>

</apex:repeat>

 
3 réponses