Skip to end of metadata
Go to start of metadata

Problem

Attachments in Quotes can increase the size of a database which may impair performance.  Overtime, you may want to delete attachments to quotes, but based on certain criteria.

Solution

The scripts attached will delete attachments in quotes:

Based on the Quote Date:

Delete Document Binary Based Earlier Than A Date - QO_Documents.sql

Based on whether the Quote is Won/Lost and a Date:

Delete Document Binary Earlier Than A Date With A Status - QO_Documents.sql

Based on whether the Quote has been converted to a Sales Order

Delete Document Binary Based Converted to Sales Order - QO_Documents.sql