About the series

This series will introduce you to two major areas related to Outlook Synchronization in Microsoft Dynamics CRM for Outlook:

Concepts & Rules

Troubleshooting

 

Introduction

In order to further understand the Outlook Synchronization, let’s look at the user-defined fields of the Outlook Synchronization. 

Usually, in a relational database, fields are defined at the table level, which means once you add a column (field) to a table of data, the column (field) will exist in all records in the table. Outlook items are like records in a database, and Outlook folders are conceptually equivalent to a table or flat-file database. This database analogy is interrupted when you consider how Outlook and Microsoft Exchange implement the concept of fields, or properties.

In Exchange, items in a folder can have any set of fields (field schema). Outlook has separate field schemas for each of the different predefined items such as Contacts, Appointments, Tasks, and such. Each of these items has a set of standard fields specific to that type of item.

In addition to the standard fields, Outlook allows you to create user-defined, or custom fields to store additional information with an item. While these user-defined fields serve the same purpose as the standard fields, you typically use them in a different manner. The most important difference between standard fields and user-defined fields is that standard fields are always available when working with a particular type of item, but this is not necessarily true when working with user-defined fields.

 

For Dynamics CRM for Outlook, the user-defined fields have the basic purpose of store the link status information between Outlook and CRM. The properties are consumed to display relevant tracking and regarding info, moreover to promote sync controls.

 


 

Sync controls

Sync controls through user-defined fields:

  • How to handle merges between changes that occur in Outlook and CRM between sync cycles using the CRMXML column

  • Allows the add-in to double check when the user attempts to re-promote the item based on the CRMID property

  • Allows the add-in to perform a search on MAPI folders if the idMappingTable is removed

    A scenario where this might occur may be when a user reconfigures the Outlook client on a new computer using the same mailbox store and sets the new computer as the Primary Synchronizing client. This functionality prevents duplicate Outlook items from being created in remember if a previously tracked item still exists in CRM the user’s mailbox. 

 

Samples of the user-defined fields

Based on the record type (email or ACTs) you can notice different fields.

Column

Description

crmEntryID (*)

it corresponds to the Outlook EntryID of the object

Crmid

it corresponds to the created record’s unique GUID in CRM

crmLinkState

it indicates the synchronization status of the item:

0 – NotLinked

1 – WillBeLinked

2 – IsLinked

3 – WillBeUnlinked

4 – WillBeUnlinkedAndDeleted

Crmorgid

it relates to the organization id in which the record persists

crmownerId

it relates to the user who owns the record in CRM, who by default is the user who tracked the record

Crmpartyinfo

it indicates all the related party members associated with the record

Crmxml (**)

it stores the OriginalXML of the synchronized record

(*) - The EntryID is the unique identifier for each mail object in the user’s mailbox. This value is also used in the idMappingTable to relate the CRMID to the appropriate Outlook EntryID.

(**) - The OriginalXML can be thought of as a “snapshot” of the record’s last synchronized state. When a tracked object is modified and then synchronized, this field is updated. This property also plays a role in the handling of merges between items changed in both Outlook and CRM.

 

Viewing the fields

The user-defined fields can be viewed using Developer tools or by adding the properties to the Outlook grid view.

For Developer tools:

  1. Click File > Options

  2. Click Customize Ribbon

  3. Under the Customize the Ribbon area, mark the Developer checkbox

 

After enables this ribbon tab:

  1. Open the desired item (i.e. contact)

  2. Hits Design This Form button

  3. Select the (All Fields) tab

  4. Choose the User-defined fields in this item menu option from the Select from drop-down menu

 

By using the Outlook grid view is useful for Side by Side comparison and allows the sorting by fields.

  1. For Outlook grid view:

  2. Click-right in the grid view

  3. Select Field Chooser option

  4. Add the desired columns (i.e. crmid or crmLinkState)

  5. Use these new columns on the grid view or the search options

 

 

Important notes

When you promote a manual modification of the user-defined fields it won’t necessarily impact the record in CRM. For example, even though it would be possible to set the crmLinkState property to 0, this would not untrack the record and cause the item to be deleted in CRM. Instead, the CRM add-in would no longer view the record as tracked from within Outlook, even though synchronization would still occur with the item.

If these fields are altered, they can be corrected during the synchronization process if the same item has changed on the server. If the item has not been changed on the server, these fields will remain in a broken state and may not allow the add-in to perform necessary functions on the item. The reason for this behavior is that the add-in will not retrieve the corrected state of the record from the server if no changes have been made to the object in the application since the last synchronized time. Thus, manual manipulation of these fields can have unintended consequences and is not recommended.

 

References

How to work with user-defined fields in solutions in Outlook 2002      

CRM for Outlook Client Synchronization Blog Series Part 2: What happens when you track an item in Outlook