Article ID: 925115
Article Last Modified on 8/15/2007
APPLIES TO
- Microsoft Dynamics CRM 3.0
SYMPTOMS
When you work with a campaign activity in Microsoft Dynamics CRM 3.0, you may experience one of the following problems:
When you delete a campaign activity that has distributed activities and corresponding campaign responses, you do not receive an error message. However, the following event is logged in the Application log on the computer that is running the server components of Microsoft Dynamics CRM 3.0:
Source: MSCRMDeletionService
Category: None
Event ID: 16387
Description: Error: Deletion Service failed to clean up some tables.- When you open a campaign response and then click the link for the originating activity, you receive the following error message if the originating activity has already been deleted:
If the DevErrors parameter is enabled, the following information is also logged in the Web.config file:
If you view the Microsoft CRM Platform Error Report, the report contains the following error message:
Note The request URL in the error message will vary depending on the type of activity that was involved when the error message occurred.
CAUSE
These problems may occur because the Deletion Service cannot delete some records from the ActivityPointerBase table. The records cannot be deleted because the records reference other records that still exist.
When you try to delete a campaign activity, Microsoft CRM tries to delete distributed activities. This occurs because Microsoft CRM is configured to delete all the campaign activities and all the distributed activities that have relationships with a campaign activity when you delete that campaign activity. This problem also occurs because distributed activities are related to campaign responses. The relationship between distributed activities and campaign responses keeps the distributed activities from being deleted. Therefore, the Deletion Service is unsuccessful.
RESOLUTION
To resolve these problems, clean up the ActivityPointer table. To clean up the ActivityPointer table, locate all the activities that have relationships with the campaign activity that you want to delete. Then, update the related fields so that the activities no longer have relationships with the campaign activity. Then, locate the campaign responses. Change the originating activity field of the campaign responses so that the campaign responses are no longer linked to the activity that is linked to the campaign activity.
To find the records that have a relationship with the originating activities that no longer exist in Microsoft Dynamics CRM 3.0, run the following query against the MSCRM database in SQL Query Analyzer or in SQL Server Management Studio.
Notes
- You must have administrator privileges to run the query so that you can see all the records that may have originating activities that no longer exist.
- The query displays the campaign, the campaign response, and the campaign response subject for each record that has an originating activity that no longer exists.
SELECT Fcr.regardingobjectidname as 'Campaign Name', Fcr.originatingactivityname as 'CampaignResponse Name', Fcr.subject as 'Campaign Response Subject' FROM [FilteredCampaignResponse] Fcr WHERE OriginatingActivityId in (SELECT [ActivityId] FROM [ActivityPointerBase] WHERE DeletionStateCode='2')
You can use the information that you receive from the query together with an Advanced Find query to open the campaign responses that have to be changed. To create the Advanced Find query, follow these steps:
- In Microsoft CRM, click Advanced Find.
- On the Find tab, click Campaign Responses in the Look for box.
- In the Use Saved View box, click All Campaign Responses.
- Point to Select, and then click Parent Campaign (Campaign).
- Point to Select, and then click Campaign Activities (Parent Campaign).
- Point to Select, and then click Activities (Regarding).
- Point to Select, and then click Activity. Point to Equals, and then click Contains Data.
- Click Find.
- Open the campaign responses that were returned.
- Change the originating activity by using the lookup button next to the originating activity. Change the originating activity to an activity that still exists.
- Save the changes.
The next time that the Deletion Service runs, the records that were marked for deletion will be deleted.
WORKAROUND
If you want to keep the originating activity name the same for archive purposes in Microsoft Dynamics CRM 3.0, you can safely close the error messages.
MORE INFORMATION
For more information about the DevErrors parameter in the Web.config file, click the following article number to view the article in the Microsoft Knowledge Base:
857192 How to modify the Web.config file to show more detailed error messages in Microsoft CRM
Additional query words: crm3 crm30 crm3.0 CRM 3.0 deletion service record unavailable 0x80040217
Keywords: kbtshoot kberrmsg kbmbsmigrate kbprb KB925115