• Bruno Araújo
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi there! 

I'm trying to automate the sync on Quote creation through apex code and I am able to sync the Opportunity with the Quote BUT instead of syncing OpportunityLineItems and QuoteLineItems, it's deleting the OpportunityLineItems from the Opportunity. 

Does anyone knows how to auto-sync but avoid deletion of OpportunityLineItems?

Here's the code: 
insert quote;
		
if(autosync){
			
	opportunity.SyncedQuoteId = quote.Id;
	update opportunity;
		
}


Cheers,
EF