Hi,
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:
[code]
DELETE FROM [giggetygiggety_MSCRM].[dbo].[QueueItemBase]
where [QueueId]='1C2ECF0D-2580-DD11-B991-001F29BD3714' and [EnteredOn]<'2009-02-01 17:38:02.000'
[/code]
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...