1

I was reading this trailhead and it says quote lines are automatically created from the opportunity products when a quote is created.

At this point, he selects the quote, and he sees that the product from the opportunity appears as a line item. Lance can add other products as line items if he wants to.

Does this work the same in apex when inserting a quote with a related Opportunity with Line Items?

2

It does not. In Apex, you need to explicitly create and insert the QuoteLineItem objects you want, providing the QuoteId and PricebookEntryId lookup values and the Quantity and UnitPrice.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.