The system deletes a Sales Quote once it is converted to order, but the created order has a track that this order was created from a quote with its number.
If you want to keep the Sales Quote then in Codeunit 86 (Sales-Quote to Order), comment the following line of codes:
DELETE;
SalesQuoteLine.DELETEALL;
And you should perhaps add one boolean field to Sales Quote which indicates that it has already been converted to Order and the Codeunit 86 (Sales-Quote to Order) should check the status of Quote before Making Order (otherwise the user will keep making orders from a quote.).
In general, I don’t agree that telling people to just comment out some code is very good advice, and to leave old quotes in the Sales Header/Sales Line tables is very bad practice. These tables store the active orders, and by leaving old records in there, you essentially change the character of the tables, from active/open transactions to also store historical information. The tables will keep growing until they become a big problem in performance.
A better solution would be to archive the quote and put in place some business process to look there for historical quote information. You need to keep the Sales Header and Sales Line tables as lean as possible.
Exactly; and by putting a check-mark into field “Archive Quotes and Orders” in the “Sales & Receivables Setup” a quote is archived automatically when an order is made.