function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dannodanno 

How to prevent Opp line items being copied to new Quote

I have a use case where not all opportunity line items should be copied to a new quote when one is created.

I plan to take manual control of creating quote line items via a trigger after quote insert.

My problem is that I cannot prevent the products from being automagically added and I cannot get the added quote line items in the after quote insert trigger (to remove them) as they have not been created.

This old post discusses the same issue but from my testing the solution will not work because the line items have not been created in the quote after insert trigger.

Is there a way to either;

A. Prevent the auto adding of opp products to new quotes
OR
B. Get the automagically added quotelineitems in the quote insert trigger

Thank you for reading!