3 min read

Deleting Imported Data with the Bulk Record Deletion Wizard

You will already be familiar with Bulk Record Deletion feature in Microsoft Dynamics CRM Online. With enhanced Import Data Wizard in November Update which supports multiple files import, this feature has also been enhanced to perform bulk deletion of records either from single imported file or all imported files at once. All other functionalities remain same as the old Bulk Record Deletion wizard.

In this blog, I’ll explain how to use Bulk Record Deletion wizard to delete imported data with the help of following scenarios.

Scenario 1: User imported a zip file containing multiple csv files and later realized that one of the source data file had some invalid data. He wants to delete imported data of that particular record type from CRM Online. This can be very easily achieved with following steps:

1. Navigate to imports grid using Workplace –> Imports


2. Select the Import file in the grid corresponding to the source file whose imported data you wish to delete. Here, please note that for all files in the zip file, a separate Import File instance is created in the grid.

3. Click More Actions –> Delete –> All Records Imported to This Entity During This Import, as shown below.


This step launches the Bulk Record Deletion wizard:


The wizard has following options:

1. You can specify the name of the Bulk Delete job

2. You can chose to send an email to yourself or any other CRM user on the completion of this bulk deletion job

3. You can also choose to delete the Import job history along with the imported data by checking the last checkbox on this screen. Basically, the difference between deleting records and job history is that deleting records deletes the Import File instance while deleting job history deletes the Import instance itself.

Clicking on OK button submits this bulk deletion job. All the records in that particular source file get deleted once this job is completed successfully. Few points worth mentionable here are:

i) Import job history can only be deleted when all associated import files have already been deleted.

ii) If multiple source files are mapped to a single record type in CRM, then all records of that particular record type in CRM gets deleted if instructions given above are followed. For example, you had a zip with 2 files namely Account1.csv and Account2.csv. If you imported this zip successfully after mapping both of these files to Account record type in CRM, you’ll see two rows corresponding to this import in the import grid. One would be for Account1.csv and other for Account2.csv. Selecting either of the row and the option “All Records Imported to This Entity During This Import” will delete imported Account record from both the files.

Scenario 2: During data import of the org, the import may fail due to some error and user may need to clean the system and import data again.

For this, user would need to follow all steps in previous scenario with a slight change in Step 3.Instead of selecting the Option “All Records Imported to This Entity During This Import” from the Delete sub-menu, user should select Option “All Imported Records from the .zip File” as shown below:


In our case, nine bulk deletion jobs are created for all the files in the imported zip. (our zip had 9 data files)

If you want to look into the state/status of all these bulk deletion jobs created by the above user action, navigate to Settings –> Data Management –> Bulk Record Deletion as shown below:


Here, you can see all the bulk delete jobs individually running for different record types for which data was imported in that particular Import session.

You can open any of these bulk delete jobs to see the details of the Bulk Delete job like Status, Results-Successes/Failures, Reasons of failures, Query used for bulk deletion (displayed in Properties Tab as shown below), etc.


As you can see above, this query is for deleting Imported Task records from a particular Import (as specified by Import Sequence Number clause of the query). As you might have understood by now, this is the normal query based deletion done by Bulk Record Deletion wizard, just that query is generated specific to an Import and a record type.

One more interesting fact that you might observe in case if you have chosen to delete the “Import history ” is that one of these bulk delete jobs will delete the data records as well as the Import instance in the end when all other records of that Import instance has already been deleted.


In our case, bulk delete job for Case entity happens to be the last one so after all Case records are deleted, the import instance is also deleted. In this case (when user opts to delete import history as well), you will not see any row related to this Import in the Import grid after all the jobs have completed successfully.