Quantcast
Viewing all articles
Browse latest Browse all 997

Server-side synchronization sending queue?

Hi,

we recently migrated from CRM 4.0 to CRM 2015. Without knowing we also migrated some emails of status "Pending send". These emails accidently got sent by server-side synchronization when we set the exchange profile for our users postboxes. 

We did not perform this inital test for each postbox, so it gets activated, but the emails were sent anyway.

We immediately deactivated the exchange profile when we recognized the system already started sending emails and set the statuscode and statecode of all pending emails to "Canceled" by using SetStateRequest. So from this on I tried to figure out how to avoid that any other old email gets sent, when we reactivate the exchange profile.

Simply setting the status/state of the emails seemed not to do the trick. For proofing this I created a second exchange profile with some faulty credentials and assigned it to my postbox. After this I created a mail activity and hit the sent button. Due to the faulty credentials of the exchange profile the sending process fails multiple times of course.

I than canceled this email by using SetStateRequest again, so that the system does not try to sent it anymore (hopefully). After this I corrected the credentials of the exchange profile, and made the initial test for my postbox again. For some reason the email that I set to "Canceled" before, got sent anyway when the initial test was finished. But somehow I can't reproduce this reliably.

However this makes me think, that there must be some kind of "sending queue" and whenever an email is in the queue it will be sent no matter what.

Does anybody know something about such a queue or is able to enlighten me about what's behind the scenes of server-side synchronization and unstoppable emails?

Before reactivating server-side synchronization for all users we need to be 100% sure, that no other old email gets unwillingly sent.

I already investigated the "dbo.SyncEntry_{Guid}" tables of the organization database, but only to find out that this has nothing to do with emails.

Queues and QueueItems of CRM also seemed to be promising, but I wasn't able to see a pattern in this data, that tells me that one or another email still wants to be sent.

Therefore I build this sql-Query:

SELECT [Title]
 ,(SELECT Value FROM StringMapBase WHERE ObjectTypeCode = 2029 AND AttributeName = 'statecode' AND AttributeValue = qib.StateCode) as [QeueItemState]
 ,(SELECT Value FROM StringMapBase WHERE ObjectTypeCode = 2029 AND AttributeName = 'statuscode' AND AttributeValue = qib.StatusCode) as [QeueItemStatus]
 ,(SELECT Value FROM StringMapBase WHERE ObjectTypeCode = qib.ObjectTypeCode AND AttributeName = 'statecode' AND AttributeValue = apb.StateCode) as [ActivityState]
 ,(SELECT Value FROM StringMapBase WHERE ObjectTypeCode = qib.ObjectTypeCode AND AttributeName = 'statuscode' AND AttributeValue = apb.StatusCode) as [ActivityStatus]
FROM [dbo].[QueueItemBase] as qib
INNER JOIN EntityView ev ON qib.ObjectTypeCode = ev.ObjectTypeCode
LEFT JOIN ActivityPointerBase apb ON ObjectId = apb.ActivityId
WHERE ev.ObjectTypeCode = 4202 /*email*/
ORDER BY apb.StatusCode

What I would really love to have is a query like "Any email that will be sent by server-side synchronization...when you activate it"

I hope someone can help us out here. 

Thanks in advance and nice regards,

MH



Viewing all articles
Browse latest Browse all 997

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>