Skip to main content
We have a VF email template that shows all products on an opportunity but doesn't seem to put them in any relevant order.  I'd like them to be returned alphabetically, is this possible?

 

This is the code for the table:

 

        <br/>  

 

        <br/>

 

        <p/>                  

 

       <table border="0" >

 

                 <tr >

 

                     <th>Product Name</th>

 

                  </tr>

 

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

 

       <tr>

 

           <td>{!opp.PriceBookEntry.name}</td>

 

       </tr>

 

    </apex:repeat>                 

 

       </table>

 

       <p />

 

 </font>

 

       

 

        </body>

 

    </html>

 

</messaging:htmlEmailBody>

 

I'm a VF novice, are there any simple solutions please?

 

 
2 个回答
  1. 2017年5月16日 08:16
    Thanks for your help Sudhir.  Unfortunately as a complete VF novice I don't understand how to do it on my email! :)
0/9000