You need to sign in to do that
Don't have an account?
bprakash
Error while syncing quotes.
Hi,iam using quote sync package to syn the quotes.
while syncing one quote line item it throws the error,
Attempted to sync object 00kQ0000008NH23 which was previously synced in this transaction
i had checked the product pricebook,pricebook entry everything looks fine.
ANy one has any suggestion.
We are experiencing the same thing. Please let me know if you find a resolution.
Hi - have you found a resolution to this issue?
Hopefully that poorly worded explanation will be of help to someone...
trigger AssignValuesFromQli on QuoteLineItem (after insert,after update) {
List<Id> ListOfQuoteIds=new List<Id>();
List<OpportunityLineItem> ListOfOLIToUpdate = new List<OpportunityLineItem>();
Map<Id,QuoteLineItem> map1=new Map<Id,QuoteLineItem>();
Map<Id,OpportunityLineItem> map2=new Map<Id,OpportunityLineItem>();
if(trigger.isInsert){
for(QuoteLineItem q:trigger.new){
ListOfQuoteIds.add(q.QuoteId);
}
List<QuoteLineItem> ListOfQLI=new List<QuoteLineItem>([Select Id,Product2Id,Quantity,ListPrice,Quote.OpportunityId from QuoteLineItem where QuoteId =:ListOfQuoteIds[0]]);
if(!ListOfQli.isEmpty())
{
String b=ListOfQLI[0].Quote.OpportunityId;
For(QuoteLineItem QPI:ListOfQLI)
{
map1.put(QPI.Product2Id,QPI);
}
List<OpportunityLineItem> ListOfOLI=new List<OpportunityLineItem>([Select Id,Product2Id,Quantity,ListPrice from OpportunityLineItem where OpportunityId =: b]);
for(OpportunityLineItem OLI:ListOfOLI)
{
map2.put(OLI.Product2Id,OLI);
}
For(OpportunityLineItem OPI:ListOfOLI)
{
if(map1.Keyset().contains(OPI.Product2Id))
{
OPI.Description=map1.get(OPI.Product2Id).Id;
ListOfOLIToUpdate.add(OPI);
}
}
If(ListOfOLIToUpdate.size()>0){
update ListOfOLIToUpdate;
}
}
}
}
Can Anyone Please Help?