Dynamics CRM Support Blog
Problems configuring the CRM Outlook client? Use the wizard!
CRM Resource Center
FAQ About Technical SupportOnline | On-Premise
FAQ About Billing
Microsoft Dynamics CRM Developer Center and SDK
We have a bunch of orphaned items in one of our queues. They appear to be left over from initial testing. These are all "email items", and whenever I click on any of them, I get an error message like this:
email With Id = f8328871-f6ee-dd11-9096-001f29bd3714 Does Not Exist
So, I've decided to clean it up. I can't delete them in CRM, because they don't exist (yet they are showing in the queue). That leaves cleaning them up in the SQL database.
I have identified the QueueID and the date of the last record I want to delete, which have given me the following SQL query:
DELETE FROM [giggetygiggety_MSCRM].[dbo].[QueueItemBase] where [QueueId]='1C2ECF0D-2580-DD11-B991-001F29BD3714' and [EnteredOn]<'2009-02-01 17:38:02.000'
Now, I don't speak fluent SQL, so I'm only 99% sure that this is what I want to do. If I run this as a Select statement (with a few field names in there), it does appear to be a match for what I'm looking to delete.
So, this should remove the items from the Queue, right? The only field that appears to link to any other table is the [ObjectID] field, which appear to be to the actual object, which matches numbers shows in "does not exist" error messages. So, deleting this shouldn't orphan anything else...
Are these items located in CRM?
Is there any chance you can remove them via Bulk Edit job?
I don't see how. Although I can create a view that will list the relevant queue items for the given queue, I have no means of acting upon the records from within the query view. From the Queue view, I don't have the "Run Workflow" option, so even if I did write a workflow to delete them, I can't find a way of running it.
Simply selecting a screenful and hitting the X to delete them doesn't work either, I get an error message doing that too. Apparently, CRM is attempting to look up the E-Mail that is reference by the Queue Item, and this will always fail, because the E-Mail is deleted.
I would recommend creating a support case to further address this issue. These orphaned records could have links elsewhere in the database that would cause other issues if you remove these only from one table. We cannot recommend making and database changes unless this has issue has come through support and has a sign off by a support engineer.
Thank you for using Microsoft Dynamics CRM Communities,
Aaron RichardsSr. Support EngineerMicrosoft Dynamics CRM
Other Microsoft Sites
I'm a Customer
I'm a Partner
Use the official Twitter tags:
#MSDYNCOMM | #CONV13