Skip to main content
2 of 2
deleted 56 characters in body
Vijay Ganji
  • 6.7k
  • 3
  • 15
  • 31

You won't be able to get the size directly in visualforce email template, for that you will have to use the repeat tag to get the count and then you can build further logic based on that variable.

<apex:variable var="sizeOfOpportunityLineItem" value="{!0}"/>
<apex:repeat value="{!relatedTo.OpportunityLineItems}">
    <apex:variable var="sizeOfOpportunityLineItem" value="{!sizeOfOpportunityLineItem + 1}"/>
</apex:repeat>
Number of Opportunity Line Items : {!sizeOfOpportunityLineItem}
Vijay Ganji
  • 6.7k
  • 3
  • 15
  • 31