web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Orphaned items in queue

(0) ShareShare
ReportReport
Posted on by 90

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...

*This post is locked for comments

I have the same question (0)
  • Gus Gonzalez Profile Picture
    27,113 on at

    Are these items located in CRM?

    Is there any chance you can remove them via Bulk Edit job?

  • Lars Hansen Profile Picture
    90 on at

    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.

  • AaronRic Profile Picture
    10,035 on at

    Hello,

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans