Error of D365 App for Outlook: Unable to Track Appointment Organized by Other System Users

D365 App for Outlook is used to track the appointment and emails from Outlook into D365. This is a light-weight application works smoothly with the Outlook but at the same time, we usually encounter issues in tracking appointments into D365.

Here, I would like to elaborate on one of the tracking issues which leave you clueless to troubleshoot it.

CRM

Problem Statement: 

Usual tracking failure of an appointment that got created by an outlook user, who is a System User as well into the D365, is being tracked by another outlook user (another D365 System user). The user tries to track the appointment from the outlook but the status of the records remains with the state as “Pending for tracking” and no corresponding record gets created into D365.

In business, this scenario is frequently encountered where the organizer is different from the user who is tracking the appointment so the issue is also frequent as well.

Analysis of the Issue:

Whenever an appointment is tracked into the D365, security-related OOB fields are populated as follows 

1. “CreatedBy”: A D365 User who tracks the outlook appointment into D365. This user can be as Required Attendees or Optional Attendees on the outlook appointment

2. “ModifiedBy”: Same as “CreatedBy”

3. “Owner”:  It is usually the organizer of the outlook appointment. If the outlook appointment is organized by any external contact, the “System” user becomes the owner of the records. On the other hand, if the D365 user itself is an organizer, D365 remains as the owner of the records in D365

Now, when an outlook appointment created by a user is different from the user who is tracking this, the value of the “Owner” and “CreatedBy” are different. In other words, an appointment is created by a user on behalf of another user. That could lead to failure if the required permission is missing to create/read Appointment records in D365 that are under other ownership. 

CRM
If the user who is tracking the Outlook Appointment is having the user level access for the Create and Read operations, the user cannot track it. 

For successful tracking of the outlook appointment, it is needed to have required access level is provided for the “Read” and “Create” actions on the Activity entity, i.e. if the organizer belongs to the same Business Unit as of the Tracking user, access level should to Business Unit level.  

Solution Approaches:

1. Very first solution approach would be to raise the access level for the Create and Read operations of the Activity entity for the user who is going to track the appointment record, but increasing of access level can lead to various security breaches and authorized data access and the business might not be giving go-ahead to this solution approach and that’s is a major challenge to deal with the issue.

2. The alternate approach is to intercept a code/Logic to replace the value of the “Owner” with the “CreatedBy”, whenever an outlook appointment is being tracked.  

Interception of the code can be done by a plugin registered on the Pre-Validation stage (not at all by registering on the Pre-Operation stage). But, here we won’t be able to get the attribute “CreatedBy” into the Plugin Context on the Pre-validation step as these attributes get added into the Plugin context starting from Pre-Operation step so alternate would be to use the “Initiating User Id” of the context.

CRM


Stay tune to get such informative articles by a best Microsoft CRM Development Team