Skip to main content
deleted 22 characters in body
Source Link
sfdcfox
  • 501.6k
  • 21
  • 473
  • 828

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 ListList<Quote> to ListList<Quote>

Variable does not exist: QuoteLineItemsQuoteLineItems

How can I resolve these problems?

Thanks in advance.

MM

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 to List

Variable does not exist: QuoteLineItems

How can I resolve these problems?

Thanks in advance.

MM

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?

Source Link

Illegal assignment from List<Quote> to List<Quote>

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 to List

Variable does not exist: QuoteLineItems

How can I resolve these problems?

Thanks in advance.

MM