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

Test Code for Visualforce Email Component Controller
Hi guys,
I can't seem to get anywhere with the test code for this simple table I put within a Visualforce Email Template:
Controller:
I can't seem to get anywhere with the test code for this simple table I put within a Visualforce Email Template:
Controller:
public class GetOpportunityProducts { public Id OpportunityId {get;set;} public List<OpportunityLineItem> GetLineItems() { List<OpportunityLineItem> line; line= [SELECT Quantity,Product2.Name,TotalPrice,Net_Value__c,CurrencyISOCODE,UnitPrice FROM OpportunityLineItem WHERE OpportunityId=: OpportunityId]; return line; } }Small Table within VS Email
<c:DisplayOppLineItems OppId="{!relatedTo.Id}" /><br/><br/> <br/>
Please create dummy test record for product, opportunity and opp line item where the comments is. Hope this helps.