You need to sign in to do that
Don't have an account?
SFDC_Devloper
Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, The pricebook entry is in a different pricebook than the one assigned to the Quote, or Quote has no pricebook assigned.: [PricebookEntryId]
Hi All,
I a facing below issue while inserting new quote line iteam, please help to fix this.
Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, The pricebook entry is in a different pricebook than the one assigned to the Quote, or Quote has no pricebook assigned.: [PricebookEntryId]
Thanks.
I a facing below issue while inserting new quote line iteam, please help to fix this.
Insert failed. First exception on row 0; first error: FIELD_INTEGRITY_EXCEPTION, The pricebook entry is in a different pricebook than the one assigned to the Quote, or Quote has no pricebook assigned.: [PricebookEntryId]
lineItemList=[select Name,ID,product2.Name,PriceBookEntryID,priceBookEntry.product2.productcode,Discount,product2ID,OpportunityID,ProductCode,ListPrice,UnitPrice,Quantity,TotalPrice from OpportunityLineItem where OpportunityID=:recordID]; for(OpportunityLineItem lineItem:lineItemList) { //Quote.iD is recoord id QuoteList.add(new QuoteLineItem(QuoteID=Quote.ID, PriceBookEntryID=lineItem.PriceBookEntryID, Product2ID=lineItem.product2ID, UnitPrice=lineItem.ListPrice, Quantity=lineItem.Quantity)); } insert QuoteList;
Thanks.