
Bulk Delete Emails with Large Attachments in Microsoft Dynamics 365
Users often track a significant number of emails in Microsoft Dynamics, including many that have attachments. These tracked emails can be very helpful in entities such as Opportunities or Accounts to allow everyone access to important information.
Over time, however, these emails can begin to consume a large amount of storage space and may require purchasing additional space for online customers. Out of the box, there is no way to mass delete only an email’s attachment – that would require custom code. But, many organizations choose to periodically mass delete the emails containing attachments.
Typically, the delete only includes emails older than a specified amount of time and/or emails with attachments above a specific size.
Here is an example using Dynamic’s bulk delete functionality – in this case, each month we want to automatically delete emails that are older than two years, have an attachment larger than 5 MB, and the email attachment was not identified as an NDA agreement.
With the appropriate security permissions, here is how that could be accomplished:
- From the gear icon, navigate to Advanced Settings > Settings > Data Management > Bulk Record Deletion
- Click “New”

- This opens the Bulk Deletion Wizard – Click Next
- Define your search criteria – this is basically an advanced find
- Set the Look For to “Email Messages” and set Use Saved View to “All Emails”
- Set the “Actual End” to Over 2 years to ensure only emails older than 2 years will be deleted
- Select the related item called “Attachments”
- Specify your file size limits and any text filters that will help ensure the correct emails are selected for deletion.
- When complete, click Next

- Now you will fill out the Select Options form – this defines when the bulk delete will run. By default, it will be set to run every 30 days – adjust as needed for your requirements.
- Click “Next”
- Review the details and click “Submit”
Next time you create a new contact record, select an account, and hit “Save the Address,” information should populate.
Now that you know how to Bulk Delete Emails with Large Attachments in Microsoft Dynamics 365, what other Microsoft Dynamics 365 challenges can our team of experts help you solve?
Take advantage of our CRM Support Services to get the help you need to solve everyday challenges and big picture concerns.
*This post is locked for comments