I ran into an issue this morning testing one of my CRM add-ons. Basically, I was processing items from an inbound, email-enabled Queue within CRM. When the processing was completed, I delete the Queue item - but it still remained in the Queue. You could not longer open it, and as far as CRM was concerned, it was "deleted," but it was still visible.
After digging around the Internet a bit, I found the answer to the issue, which seems to only appear if you have upgraded from CRM 3.0 to 4.0.
Using SQL Server Management Studio, open the CRM database and locate the QueueItembase table. Expand the Triggers group.
Right-click on the t_update_queueitembase trigger and select Disable.
This will effectively turn off the trigger and future queue items will be removed as expected ( and the way CRM 3.0 functioned ).
Note: It does not appear that a fresh installation of CRM 4.0 has this trigger, which is probably why this procedure works.
But, that doesn't take care of existing queue records that where created and "deleted" before you disabled the trigger. The next steps will correct that issue.
Using SQL Server Management Studio, perform the following query on the CRM database:
select * from queueitembase WHERE QueueId = 'GUID for queue' AND DeletionStateCode = 0
Note: Replace GUID for queue with the GUID for the queue in question.
If any records are returned, you will need to perform the following query to clear them from the queue list:
UPDATE dbo.QueueItemBase SET DeletionStateCode = 2 WHERE QueueId = 'GUID for queue' AND DeletionStateCode = 0
Note: Replace GUID for queue with the GUID for the queue in question.
This will change the status to "deleted" and remove them from the queue.
5 Responses
Grateful
30|Apr|2008 1Wonderful, this issue has been annoying the heck out of us! Good find, thanks.
Thanks
20|May|2008 2One extra note you should add, those records marked for deletion may take up to 24 hours to be removed….
Mr CRM
06|Jun|2008 3Thank you. mr Bacon saver !
Regan
14|Jul|2008 4Thanks for that Mitch!
I re-wrote the sql above to make it faster to find and deactivate the ghost email records. The following will find all "email" items in *any* queue (i.e. user queues too) where the associated email does not exist in the email table and update its status to deleted.
UPDATE dbo.QueueItemBase
SET DeletionStateCode = 2
WHERE
objecttypecode = '4202'
and ObjectId not in (Select ActivityId from EmailBase)
and DeletionStateCode = 0
mitch
01|Aug|2008 5Via Regan Murphy:
Microsoft has released a hotfix for this problem now
http://support.microsoft.com/kb/948172/en-us
Cheers
Regan
Leave a reply
Search
Categories
Archives
Meta
Most Viewed
Tags
A design creation of Design Disease
Copyright © 2007 - Mitch Milam's Microsoft Discussions - is proudly powered by WordPress
InSense 1.0 Theme by Design Disease brought to you by HostGator Web Hosting.