Skip to main content
Premawati . (Deloitte USI) 님이 #Collaboration에 질문했습니다
  List<OpportunityLineItem> t prod=[SELECT Id, Name,(SELECT Quantity, UnitPrice, TotalPrice,PricebookEntry.Name, PricebookEntry.Product2.Family FROM OpportunityLineItems) FROM OpportunityLineItems WHERE ParentId = :oppName.Id];

 

But getting error :  Compile Error: Invalid type: OpportunityLineItems at line 12 column 5
답변 27개
  1. 2018년 7월 10일 오전 6:58
    Use this query

     

    list<OpportunityLineItem> tprod=[SELECT Name,Quantity, UnitPrice, TotalPrice,PricebookEntry.Name, PricebookEntry.Product2.Family FROM OpportunityLineItem WHERE OpportunityId = :oppName.Id];

     

    And to display the details you are using a Product2 that's why you are getting the errors. Use OpportunityLineItem.