Applies to Dynamics 365 (online), version 9.x
Applies to Dynamics 365 (online), version 8.x
These are ways to reduce the amount of storage space used by removing or deleting different types of information from Dynamics 365. Use one or more of these methods to control your total data storage usage with Dynamics 365. You can delete certain categories of data as the need arises, or you can set up bulk deletion jobs to reoccur at set intervals.
Warning
The suggestions in this topic include deleting notes, attachments, import history, and other data. Before you delete data, be sure that the data is no longer needed because you cannot retrieve deleted data. There is no “undo” to restore your data once it has been deleted. This means it may make more sense for you to increase the amount of storage space you have with your Microsoft Dynamics 365 subscription instead of reducing the amount of storage space used.
Note
Except for methods 3 and 5, all these methods require that you have an administrator Dynamics 365 security role, such as System Administrator. This gives you permission to delete records in bulk and to delete system jobs.
Method 1: Delete bulk email and workflow instances using a bulk deletion job
Warning
If you delete this data, you will no longer be able to tell if an email was sent through bulk email or if a workflow rule ran against a record. The emails that were sent and the actions that ran against the record in the workflow will remain.
Go toSettings>Data Management.
ChooseBulk Record Deletion. In the menu bar, chooseNew. This opens the Bulk Deletion Wizard.
ChooseNext.
In theLook forlist, selectSystem Jobs.
In the search criteria area, add criteria similar to the following:
System Job Type–Equals–Bulk E-mail;Workflow;
Status Reason–Equals–Succeeded
Completed On–Older Than X Months– 1
Group the three criteria rows:
Choose the arrow next to each criteria row, and then chooseSelect Row.
With all three rows selected, chooseGroup AND.
ChooseNext.
In theNametext box, type a name for the bulk deletion job.
Select a date and time for the job start time; preferably a time when users are not in Dynamics 365.
Select theRun this job after everycheck box, and then in thedayslist, select the frequency you want the job to run.
If you want a notification e-mail sent, select theSend an e-mail to me (email@domain.com) when this job is finishedcheck box.
ChooseNext, review the bulk deletion job, and then chooseSubmitto create the recurring job.
Method 2: Evaluate and delete suspended workflows
Sometimes workflows will enter a suspended state because there is a condition that will never be met or some other reason that will not allow the workflow to continue.
Warning
Some workflows will be in a suspended state because they are waiting for a condition that has not yet been met, which is expected. For example, a workflow may be waiting for a task to be completed.
ChooseAdvanced Find.
In theLook forlist, selectSystem Jobs.
In the search criteria area, add criteria similar to the following:
System Job Type–Equals–Workflow
Status Reason–Equals–Waiting
Group the two criteria rows:
Choose the arrow next to each criteria row, and then chooseSelect Row.
With all three rows selected, chooseGroup AND.
ChooseFind.
In the results window, you can open each item to determine whether the workflow can be deleted.
Method 3: Remove email attachments using Advanced Find
Warning
If you delete this data, the attachments will no longer be available in Dynamics 365. However, if you have them saved in Office Outlook, they will still be there.
ChooseAdvanced Find.
In theLook forlist, selectEmail Messages.
In the search criteria area, add criteria similar to the following:
Email Attachments (Item)
File Size (Bytes)–Is Greater Than- In the text box, type a byte value, such as 25000.
ChooseResults.
UnderActivities, you will now have a list of email messages that have attachments that are larger than ‘X’ bytes. Review the emails and delete the attachments as needed.
Method 4: Remove email messages with attachments using a bulk deletion job
Warning
If you delete this data, the email messages and their associated attachments will no longer be available in Dynamics 365. However, if you have them saved in Office Outlook, they will still be there.
Go toSettings>Data Management.
ChooseBulk Record Deletion, and then in the menu bar, chooseNew. This opens the Bulk Deletion Wizard.
ChooseNext.
In theLook forlist, selectEmail Messages.
In the search criteria area, add criteria similar to the following:
Status Reason–Equals–Completed
Actual End–Older Than X Months– 1
Email Attachments (Item)
File Size (Bytes)–Is Greater Than– In the text box, type a byte value, such as 25000.
Group the first two criteria rows:
Choose the arrow next to each criteria row, and then chooseSelect Row.
With both rows selected, chooseGroup AND.
ChooseNext.
In theNametext box, type a name for the bulk deletion job.
Select a date and time for the job start time; preferably a time when users are not in Dynamics 365.
Select theRun this job after everycheck box, and then in thedayslist, select the frequency you want the job to run.
If you want a notification e-mail sent, select theSend an email to me (email@domain.com) when this job is finishedcheck box.
ChooseNext, review the bulk deletion job, and then chooseSubmitto create the recurring job.
Method 5: Remove notes with attachments using Advanced Find
Warning
If you delete this data, notes and their associated attachments will no longer be available in Dynamics 365.
ChooseAdvanced Find.
In theLook forlist, selectNotes.
In the search criteria area, add criteria similar to the following:
File Size (Bytes)–Is Greater Than– In the text box, type a byte value, such as 1048576.
ChooseResults.
You will now have a list of attachments that are larger than the size you specified.
Select individual or a multiple attachments, and then chooseDelete(X).
Method 6: Remove notes with attachments using a bulk deletion job
Warning
If you delete this data, notes and their associated attachments will no longer be available in Dynamics 365.
Go toSettings>Data Management.
ChooseBulk Record Deletion, and then in the menu bar, chooseNew. This opens the Bulk Deletion Wizard.
ChooseNext.
In theLook forlist, selectNotes.
In the search criteria area, add criteria similar to the following:
File Size (Bytes)–Is Greater Than– In the text box, type a byte value, such as 1048576.
Created On–Older Than X Months– 1
Group the two criteria rows:
Choose the arrow next to each criteria row, and then chooseSelect Row.
With all three rows selected, chooseGroup AND.
ChooseNext.
In theNametext box, type a name for the bulk deletion job.
Select a date and time for the job start time; preferably a time when users are not in Dynamics 365.
Select theRun this job after everycheck box, and then in thedayslist, select the frequency you want the job to run.
If you want a notification e-mail sent, select theSend an email to me (email@domain.com) when this job is finishedcheck box.
ChooseNext, review the bulk deletion job, and then chooseSubmitto create the recurring job.
Method 7: Remove bulk duplicate detection jobs and associated copies of duplicate records
Every time that a duplicate detection job runs, a copy of each duplicate record is stored in the database as part of the duplicate detection job. For example, if you have 100 duplicate records, every time that you run a duplicate detection job that finds these duplicates, whether it is manual or reoccurring, those 100 duplicate records will be stored in the database under that instance of that duplicate job until the duplicates are merged or deleted, or until the instance of that duplicate detection job is deleted.
Go toSettings>Data Management.
ChooseDuplicate Detection Jobs.
Select the duplicate detection job instances you want to delete and then chooseDelete(X).
To avoid wasting storage space, make sure duplicates are resolved promptly so that they are not reported in multiple duplicate detection jobs.
Method 8: Delete bulk import instances using a bulk deletion job
Every time you perform a bulk import, there is a system job associated with that import. The system job details show which records imported successfully and which records failed.
Warning
After you delete these bulk import jobs, you will not be able to see what data was imported and you cannot roll back the import.
Go toSettings>Data Management.
ChooseBulk Record Deletion, and then in the menu bar, chooseNew. This opens the Bulk Deletion Wizard.
ChooseNext.
In theLook forlist, selectSystem Jobs.
In the search criteria area, add criteria similar to the following:
System Job Type–Equals–Import
Status Reason–Equals–Succeeded
Completed On–Older Than X Months– 1
Group the three criteria rows:
Choose the arrow next to each criteria row, and then chooseSelect Row.
With all three rows selected, chooseGroup AND.
ChooseNext.
In theNametext box, type a name for the bulk deletion job.
Select a date and time for the job start time; preferably a time when users are not in Dynamics 365.
Select theRun this job after everycheck box, and then in thedayslist, select the frequency you want the job to run.
If you want a notification e-mail sent, select theSend an email to me (email@domain.com) when this job is finishedcheck box.
ChooseNext, review the bulk deletion job, and then chooseSubmitto create the recurring job.
Method 9: Delete bulk deletion job instances using a bulk deletion job
When you are bulk deleting data, such as in many of the methods described in this article, a bulk deletion system job is created and can be deleted.
Warning
After you delete these jobs, you will lose the history of the prior bulk deletion jobs that you’ve run.
Go toSettings>Data Management.
ChooseBulk Record Deletion, and then in the menu bar, chooseNew. This opens the Bulk Deletion Wizard.
ChooseNext.
In theLook forlist, selectSystem Jobs.
In the search criteria area, add criteria similar to the following:
System Job Type–Equals–Bulk Delete
Status Reason–Equals–Succeeded
Completed On–Older Than X Months– 1
Note
You could also delete jobs that have failed or been canceled.
Group the three criteria rows:
Choose the arrow next to each criteria row, and then chooseSelect Row.
With all three rows selected, chooseGroup AND.
ChooseNext.
In theNametext box, type a name for the bulk deletion job.
Select a date and time for the job start time; preferably a time when users are not in Dynamics 365.
Select theRun this job after everycheck box, and then in thedayslist, select the frequency you want the job to run.
If you want a notification e-mail sent, select theSend an email to me (email@domain.com) when this job is finishedcheck box.
ChooseNext, review the bulk deletion job, and then chooseSubmitto create the recurring job.
Method 10: Delete audit logs
When you enable auditing, Dynamics 365 creates audit logs to store the audit history of the records. You can delete these audit logs to free space when they are no longer needed.
Warning
When you delete an audit log, you can no longer view the audit history for the period covered by that audit log.
Go toSettings>Auditing.
In theAuditarea chooseAudit Log Management.
Select the oldest audit log, then chooseDelete Logs.
In the confirmation message chooseOK.
Note
You can only delete the oldest audit log in the system. To delete more than one audit log repeat deleting the oldest available audit log until you have deleted enough logs.