In my email template, I am displaying entities in a association in table, doing the following:
<table border="0">
<tr>
<th>Opportunity</th><th>Digest Note</th>
</tr>
<apex:repeat var="fact" value="{!relatedTo.DM_Interesting_Facts__r}">
<tr>
<td>{!fact.Interesting_Fact__c}</td>
</tr>
</apex:repeat>
</table>
I want to
- Add order to the the table. So that the entities in the association are ordered by the value of a certain attribute?
- Filter values in the table. I only want to display entities when another attribute has a certain value.
Any tips?
Attribution to: dublintech
Possible Suggestion/Solution #1
If you're using an email template you're out of luck with order.
If you use a visualforce page with a controller you can then get a list of your facts and order them with Apex before it's rendered.
Attribution to: Salesforce Wizard
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/5578