• Admin User 8648
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies
Hi ,

I am trying to ad a Table in Visualforce Email Template which will pull up all child records.
My code is working fine with pulling data However , Its adding mutiple rows for every new record instead of adding up Columns.

Can anybody help me identifying whats wrong? Below is my Table  :-
 
<table border="0"  align="center" width="300">
        <caption>Parts Requested</caption>
        <apex:repeat var="cx" value="{!relatedTo.Product_Request_Line_Items__r}"> 
       
             <tr>
    <th> Model Number</th>
    <td>{!cx.Model_Number__c}</td>
             </tr>
             
             <tr>
    <th> Serial Number</th>
    <td> {!cx.Serial_Number__c}</td>
             </tr>
             
             <tr>
    <th> Part Number</th>
    <td> {!cx.Part_Number__c}</td>
             </tr>
             
             <tr>
    <th> Part Description</th>
    <td> {!cx.Part_Description__c}</td>
             </tr>
             
             <tr>
    <th> Quantity</th>
    <td> {!cx.Quantity__c}</td>
             </tr>
             
             <tr>
    <th>Reason </th>
    <td> {!cx.Reason__c}</td>
             </tr>
    
           </apex:repeat>                
        </table>

 
I am trying to Pull up List of Service Appointments related to accounts however unable to get result as I keep geeting error .

Here is what I have Tried :-

A) SELECT ID , Name, (SELECT FSL__Service_Appointment__r.AppointmentNumber, FSL__Service_Appointment__r.SchedStartTime FROM FSL__Service_Appointment__r WHERE Status = 'Scheduled'  ORDER BY SchedStartTime ) FROM Account GROUP BY ID

B) SELECT ID , Name, (SELECT AppointmentNumber, SchedStartTime FROM ServiceAppointment WHERE Status = 'Scheduled'  ORDER BY SchedStartTime ) FROM Account GROUP BY ID

Both throws an Error Unable to Undertand the relationship. 
Hi ,

I am trying to ad a Table in Visualforce Email Template which will pull up all child records.
My code is working fine with pulling data However , Its adding mutiple rows for every new record instead of adding up Columns.

Can anybody help me identifying whats wrong? Below is my Table  :-
 
<table border="0"  align="center" width="300">
        <caption>Parts Requested</caption>
        <apex:repeat var="cx" value="{!relatedTo.Product_Request_Line_Items__r}"> 
       
             <tr>
    <th> Model Number</th>
    <td>{!cx.Model_Number__c}</td>
             </tr>
             
             <tr>
    <th> Serial Number</th>
    <td> {!cx.Serial_Number__c}</td>
             </tr>
             
             <tr>
    <th> Part Number</th>
    <td> {!cx.Part_Number__c}</td>
             </tr>
             
             <tr>
    <th> Part Description</th>
    <td> {!cx.Part_Description__c}</td>
             </tr>
             
             <tr>
    <th> Quantity</th>
    <td> {!cx.Quantity__c}</td>
             </tr>
             
             <tr>
    <th>Reason </th>
    <td> {!cx.Reason__c}</td>
             </tr>
    
           </apex:repeat>                
        </table>

 
I am trying to Pull up List of Service Appointments related to accounts however unable to get result as I keep geeting error .

Here is what I have Tried :-

A) SELECT ID , Name, (SELECT FSL__Service_Appointment__r.AppointmentNumber, FSL__Service_Appointment__r.SchedStartTime FROM FSL__Service_Appointment__r WHERE Status = 'Scheduled'  ORDER BY SchedStartTime ) FROM Account GROUP BY ID

B) SELECT ID , Name, (SELECT AppointmentNumber, SchedStartTime FROM ServiceAppointment WHERE Status = 'Scheduled'  ORDER BY SchedStartTime ) FROM Account GROUP BY ID

Both throws an Error Unable to Undertand the relationship.