3 answers
So my original code is
Which works except for the combing of the opportunity name with the product name. When I try using Product2.nameList<OpportunityLineItem> getList= [SELECT Id, Name, TotalPrice FROM OpportunityLineItem
WHERE Opportunity.AccountId=:ApexPages.currentPage().getParameters().get('id')
ORDER BY Name];
I get the following error on my visual force page "System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: OpportunityLineItem.Name Class.AccountChartClass.getChart1: line 11, column 1"I'm not sure what I'm doing wrongThanks,List<OpportunityLineItem> getList= [SELECT Id, Product2.Name, TotalPrice FROM OpportunityLineItem
WHERE Opportunity.AccountId=:ApexPages.currentPage().getParameters().get('id')
ORDER BY Name];