[Applies to: Microsoft Dynamics CRM 4.0]
Find the latest SDK documentation: CRM 2015 SDK
In Microsoft Dynamics CRM, deleting an entity by using the Web application or through SDK Web service calls usually results in a "soft delete" where the entity is not immediately deleted from the database. Instead, the entity is marked for deletion later. The platform marks the entity for deletion by setting the entity's DeletionStateCode attribute to 2. Entities with a DeletionStateCode attribute set to 2 are filtered out from all data views in the Web application and are not accessible using the SDK.
These marked entities are physically deleted from the database by the Deletion Service. The Deletion Service is an asynchronous operation that is based on a table named ScaleGroupOrganizationMaintenanceJobs in the MSCRM_CONFIG database of Microsoft Dynamics CRM. By default, the frequency of the Deletion Service job execution is set to once a day. You can use the Scale Group Job Editor tool to change the execution frequency of the Deletion Service. You can find the tool on the Web at http://code.msdn.microsoft.com/ScaleGroupJobEditor.
© 2010 Microsoft Corporation. All rights reserved.