You need to sign in to do that
Don't have an account?
John Braun
Creating Multiple Quotes against an opportunity WITHOUT copying existing quote line items
Hello!
I was wondering if anyone has ran into this business requirement:
Currently, using native salesforce.com functionality, if you use products and pricebooks with quotes and the syncing functionality - everytime you create a new quote against an opportunity, it will automatically copy the existing quote line items from the synced quote into the newly created quote.
We have a business requirement for which we do NOT want to copy the existing quote line items into the new quote. Has anyone found a way around this? Thanks for any help!!!!
Hi Johh,
You will need to write code for that. There will be 1 class and 2 triggers. Oh and a custom checkbox field in Quote if you want to give users a choice to copy the Line Items when create a new quote.
Class Util
Quote trigger:
QuoteLineItem trigger:
I hope this is what you are looking for.
Boom B,
Would this work if you do not want the initial quote to carry over the products that have been added to the opportunity.
We are looking to create an opportunity and add products to it, but then create a quote, but not have the products on the opportunity added to the quote.
Thanks
Opportunity myOpp = [Select id, pricebook2id from Opportunity where id = '006g0000008Zct2'];
Quote testQuote = new quote();
testQuote.name='TEST QUOTE';
testQuote.ExpirationDate=date.today();
//testQuote.Quote_Vendor_Profile__c=
testQuote.Pricebook2id=myOpp.pricebook2id;
testQuote.opportunityid = myOpp.id;
insert testQuote;
myOpp.SyncedQuoteId=testQuote.id;
update myOpp;
What I want, is the opposite. I want to mimick the New Quote button where the exiting Oppty Products are automatically created on the New Quote.