I'm doing a sync with OpportunityLineItem and QuoteLineItem based on this tutorial: http://rajgulshan.blogspot.com/2017/05/sync-quote-line-item-custom-fields-with.html
I've got a problem here:
private static Map<ID,ID> returnDefaultLinking(Set<ID> poIds)
{
System.debug('++++++poIds ====>' + poIds);
Map<ID,ID> mapSortOrder= new Map<ID,ID>();
//String query='select id, name,(select id, Opportunity_Line_Item_ID__c from QuoteLineItems ) from Quote where id in :poIds';
//List<Quote> lstQuotesWithLineItems=Database.query(query);
List<Quote> lstQuotesWithLineItems = new List<Quote>();
lstQuotesWithLineItems = ([select id, name,(select id, Opportunity_Line_Item_ID__c from QuoteLineItems )
from Quote where id in :poIds]);
if(lstQuotesWithLineItems.size() > 0){
for(Quote q : lstQuotesWithLineItems)
{
if(q.QuoteLineItems !=null)
{
for(QuoteLineitem qli : q.QuoteLineItems)
{
if(qli.Opportunity_Line_Item_ID__c!=null)
{
//map quote line item id with respective opportunity line item id
mapSortOrder.put(qli.Id,ID.valueOF(qli.Opportunity_Line_Item_ID__c));
}
}
}
}
}
return mapSortOrder;
}
Illegal assignment from List<Quote>
to List<Quote>
Variable does not exist: QuoteLineItems
How can I resolve these problems?
Illegal assignment from List to List
orVariable does not exist: QuoteLineItems
?