But I would like to go one level deeper and list each LineItem__c that is associaated with each order. In my head (this clearly isn't right, but I think it shows intent) it would work like this:apex:repeat value="{!relatedTo.Order__r}" var="buyline">
<apex:outputPanel rendered="{!IF(buyline.Broadcast_Week__c = relatedTo.Send_Request__c, true, false)}">
<table>
<tr>
<td>{!buyline.Buy_Title__c}</td>
</tr>
so that the records related to each related record (boy that's a mouthful) could be listed. Is this even possible?Thanks, John<tr>
<apex:repeat value="{!relatedTo.Order__r.LineItem__r}" var="days">
<td>line item details will go here</td>
</apex:repeat>
</tr>
</table>
</apex:outputPanel>
</apex:repeat>
so I am getting the error:
when trying to compile my controller. I have never written a controller for an email template before, only actual pages. Do I need to reference the template in the controller somewhere?here is what I am trying to compile:Error: Compile Error: Variable does not exist: relatedTo.Id at line 9 column 100
public class NetworkOrders{
public List<Order__c> orders {get;set;}
public NetworkOrders(){
List<Order__c> orders = new List<Order__c>();
orders = [Select Id, Name, (Select Id, Name from LineItems__r) from Order__c where Network__c = :relatedTo.Id];
}
}
thank you so much for your help!