You need to sign in to do that
Don't have an account?

Visualforce Email Template referring Opportunity line item fields
Hi,
I need to create a VF email template in Salesforce and need to refer opportunity line items. I have custom object training__C that has a lookup with Opportunity object.
How can I refer Opportunity line items from training__C object?
Thanks for your help.
I need to create a VF email template in Salesforce and need to refer opportunity line items. I have custom object training__C that has a lookup with Opportunity object.
How can I refer Opportunity line items from training__C object?
Thanks for your help.
I tried this on my org and turns out that accessing the opportunity line item from the custom object will not be possible as this would need a controller to access the line items on the page and as a template cannot call a controller - this would be difficult to acheive.
A workaround to this is to wite a custom component which works with a controller to get opportunity line items and then call this component in your visualforce template.
The below thread talks about it with sample code:
https://developer.salesforce.com/forums/?id=906F00000008wHiIAI