Run Bulk Delete
To submit a bulk delete job, use the BulkDeleteRequest message. The bulk delete job runs asynchronously in the background without blocking other activities. The query expressions that describe the records on which to run the bulk delete job are specified in the QuerySet property of this request.
A bulk delete job is represented by the bulk delete operation entity. The schema name for this entity is BulkDeleteOperation. A bulk delete operation record includes the following information:
Number of records that the bulk delete job deleted.
Number of records that the bulk delete job failed to delete.
Whether the bulk delete job is a recurring job or not.
Start time of the bulk delete job.
A bulk delete job only deletes records that are created before the job starts to run.
|If a bulk delete job fails or ends prematurely, any records that were deleted before the failure or ending of the job are not rolled back and remain deleted. The failures of the BulkDeleteOperation are stored in the BulkDeleteFailure records and can be retrieved by using the RetrieveRequest message or the RetrieveMultiple message.|
A bulk delete job deletes the specified records according to the cascading rules. These rules are based on the relationship type between the entities. For more information, see Entity Relationship Behavior.
To run a bulk delete job, a user must have the BulkDelete Privileges and Delete Privileges for the entity types being deleted. The user must also have read permissions to the entity records that are specified in the BulkDeleteRequest message. By default, a system administrator has the necessary permissions; however, other users must be granted these permissions.
You can perform a bulk deletion on all entities that are supported by the delete action. For information about possible actions on entity records, see Actions on Entity Records.
If a plug-in or a workflow (process) is triggered by the delete action on a specific entity type, it is triggered every time that an entity record of this type is deleted by the bulk delete job.
TasksSample: Bulk Delete Exported Records
Sample: Bulk Delete Records That Match Common Criteria
ConceptsEntity Relationship Behavior
Recurrence Pattern in Asynchronous Job Execution
Other ResourcesDelete Data in Bulk in Microsoft Dynamics CRM
Manage Your Data
Security Role and Privilege Reference
Microsoft Dynamics CRM 2011
Send comments about this topic to Microsoft.
© 2013 Microsoft Corporation. All rights reserved.