function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Visualforce email template with opportunity product line items

hi everyone,


I am looking for a Visualforce email template which will show the opportunity product line items please.


If you could share one, it will be greatly appreciated.

Edwin VijayEdwin Vijay

Hope this article helps you...


Salesforce unearthed - Visualforce email template




Anyone care to share some sample code? I'm trying to create a VF email template which includes opportunity product line item details.




Here's some code that I am working with; it does seem to work. The email is related to Opportunity and the key is that you're pulling from Opportunity Line Items.


   <table border="0"><tr><th>Product</th><th>Quantity</th><th>Effective_Date</th><th>Effective_Date</th></tr><apex:repeat var="cx" value="{!relatedTo.OpportunityLineItems}"><tr><td><a href="{!}">{!cx.Description}</a></td></tr><td>{!cx.Quantity}</td><td>{!cx.Effective_Date__c}</td><td>{!cx.End_Date__c}</td></tr></apex:repeat></table>



Hope this helps.


JAck D