• Jennifer Jobson 9
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
I have a table in a visualforce template that I need ordered by date.  Here is the code currently:
<table border="0" >
<tr >
  <th>Product</th>  <th>Price</th>  <th>Quantity</th>    <th>UOM</th>    <th>Number of Pallets</th>   <th>Total Weight</th>   <th>Pickup Date</th>   <th>Comments</th>
</tr>
<apex:repeat var="cx" value="{!relatedTo.Product_Entries__r}">
<tr><td>{!cx.Product__r.Name}</td>
<td> {!cx.Price__c}</td>
<td> {!cx.Quantity__c}</td>
<td> {!cx.UoM__c}</td>
<td> {!cx.Number_of_Pallets__c}{!cx.Florisil_Number_of_Pallets__c}</td>
<td> {!cx.Total_Weight_including_pallets__c}{!cx.Florisil_Line_Item_Total_Weight__c}</td>
<td> <apex:outputText value="{0, date, MMMM d','  yyyy}">
    <apex:param value="{!cx.Pickup_Date__c}" />
</apex:outputText></td>
<td> {!cx.Comments__c}</td>
       </tr>
    </apex:repeat>                 
       </table>

And here is how it looks:
User-added imageHow do I get the list to sort by pickup date?  Thanks for any help!
We have a VisualForce email template that was working just fine and I added a new line with a merge field.  Everything works when using the "send test and verify" link but when used in production, it leaves off some of the merge fields.  Not all of them, just some of them.  Here is the part of the code that is missing their values in BOLD.  Any idea why this is happening?

        <br/>Payable Rate: {!relatedTo.Quote_No__r.Payable_Rate__c}  

      <p/>       
<br/>
<table border="0" >
<tr >
  <th>Product</th>  <th>Quantity</th>    <th>UOM</th>    <th>Number of Pallets</th>   <th>Total Weight</th>   <th>Pickup Date</th>   <th>Comments</th>
</tr>
<apex:repeat var="cx" value="{!relatedTo.Product_Entries__r}">
<tr><td>{!cx.Product__r.Name}</td>
<td> {!cx.Quantity__c}</td>
<td> {!cx.UoM__c}</td>
<td> {!cx.Number_of_Pallets__c}</td>
<td> {!cx.Total_Weight_including_pallets__c}</td>
<td> <apex:outputText value="{0, date, MMMM d','  yyyy}">
    <apex:param value="{!cx.Pickup_Date__c}" />
</apex:outputText></td>

<td> {!cx.Comments__c}</td>
       </tr>
    </apex:repeat>                 
       </table>
<p /> 
I have a table in a visualforce template that I need ordered by date.  Here is the code currently:
<table border="0" >
<tr >
  <th>Product</th>  <th>Price</th>  <th>Quantity</th>    <th>UOM</th>    <th>Number of Pallets</th>   <th>Total Weight</th>   <th>Pickup Date</th>   <th>Comments</th>
</tr>
<apex:repeat var="cx" value="{!relatedTo.Product_Entries__r}">
<tr><td>{!cx.Product__r.Name}</td>
<td> {!cx.Price__c}</td>
<td> {!cx.Quantity__c}</td>
<td> {!cx.UoM__c}</td>
<td> {!cx.Number_of_Pallets__c}{!cx.Florisil_Number_of_Pallets__c}</td>
<td> {!cx.Total_Weight_including_pallets__c}{!cx.Florisil_Line_Item_Total_Weight__c}</td>
<td> <apex:outputText value="{0, date, MMMM d','  yyyy}">
    <apex:param value="{!cx.Pickup_Date__c}" />
</apex:outputText></td>
<td> {!cx.Comments__c}</td>
       </tr>
    </apex:repeat>                 
       </table>

And here is how it looks:
User-added imageHow do I get the list to sort by pickup date?  Thanks for any help!