When recently installing the Dynamics 365 App for Outlook, I was able to track some of my Emails against records into my selected Dynamics 365 environment. When I tried to track a previously sent Email against a Case record or that Case’s Primary Contact record, it gets stuck at “Track pending…” and then ends up with “Tracking failed”. Note that incoming Emails for me were being tracked.
Microsoft documentation states there is tracking server-side synchronization that happens between Outlook and Microsoft Dynamics 365 every 15 minutes. This was very odd, seeing that my CRM Mailbox record passed the ‘Test & Enable Mailbox’ steps, has the correct server-side synchronization settings, and I have the correct permissions to the app and to the records. I’ve also attempted to removed the Dynamics 365 App for Outlook, and re-installing it via Manage Add-ins. If you haven't done this, you might have to do the above checks first.
Even with “Track without Regarding” set still doesn’t track the Email.
Looking into the issue further, I checked the Alerts tab on my CRM Mailbox record, and there are multiple “UnknownIncomingEmailIntegrationError” warnings. These were unrelated to the Email record I was tracking, and were dealing with the incoming emails that were being tracked successfully.
This prompted me to check for all background processes, such as plugins and workflows that is triggered on the Email entity. Upon further investigation, I discovered a synchronous custom workflow that is triggered on create of an Email record. It has an Update Step that will update the created Email if it is an Outgoing Email (i.e. it gets Sent).
When an Outlook Email is tracked, an Email record is created in Dynamics 365 and is linked to the relevant record via the Regarding lookup. The Sent Email that I am trying to sync in Outlook gets created in CRM as an Outgoing Email with a Status of Sent. When this is triggered, the synchronous workflow fails on the Update step because its not in a Draft State. Since it’s a synchronous job and it fails, it interferes with the Outlook integration, and does not end up creating the email record.
Since Outlook integration tracking is trying to create the Email record in CRM but the failed workflow is not successfully processing, the Dynamics 365 App for Outlook is reattempting to create the record multiple times. This calls the custom workflow again, but also fails multiple times in succession within a minute.
Checking the other System Jobs, and clicking the Regarding Email record, the record is conveniently named “E-mail” which is suspicious, and it looks like it hasn’t even created successfully.
After I deactivated the workflow, I re-attempted to track the Sent Email again in Outlook, and it worked successfully. Instead of clicking to reattempt the Track Regarding, it might work better if you click “Track without Regarding”, then set Regarding after. This usually works instantaneously during my tests.
The custom workflow was updated to work around the Outlook tracking integration, including setting the workflow to run asynchronously.
Hope this blog assists you in troubleshooting your tracking issues with the Dynamics 365 App for Outlook, allow you to assess your background processes, and implement best practices solutions to work around the Outlook tracking integration.
Comments