Share via


Conflict Resolution and You

[This is now documented here: https://msdn2.microsoft.com/en-us/library/bb821131.aspx

This is a topic from an upcoming refresh to the Outlook Integration API documentation. Since some folks had expressed interest in getting this topic now, development allowed me to blog it. Enjoy!

About Conflict Resolution for Custom Item Types

This topic describes how you can specify how conflicts are resolved for custom item types that you create in Microsoft Office Outlook.

Conflict Resolution for Standard Outlook Item Types

In Outlook, conflicts occur when two or more copies of the same item have been modified independently of each other. Outlook detects conflicts during synchronization. For example, you update a meeting request online on Outlook Web Access and then you update the same meeting request on Outlook when you work offline. When Outlook goes online again and synchronizes the data between the client computer and the server, it detects that there are two different copies of the same meeting request.

Versions of Outlook before Outlook 2003

In versions of Outlook before Outlook 2003, when Outlook synchronizes data, it does not consider properties specific to an item type. When Outlook detects conflicts, Outlook presents the conflicting copies of the item and the user decides which copy to keep.

Outlook 2003 and Outlook 2007

In Outlook 2003 and Outlook 2007, when Outlook synchronizes items that belong to a standard Outlook item type, it takes into consideration the properties that are specific to that item type to detect possible conflicts. Outlook tries to resolve conflicts and stores the resultant copy in the appropriate folder without requesting user intervention. In cases where Outlook considers that there is a possibility that the resultant copy may not contain all essential data, Outlook stores the conflicting copies in the Conflicts folder, under the Sync Issues folder. (Note that Sync Issues and its subfolders are hidden until you click Folder List on the Go menu.) In such cases, users can choose to go to the Conflicts folder to verify which items were in conflict and whether to use a copy in the Conflicts folder to replace the copy that Outlook decided to retain.

Conflict Resolution for Custom Item Types

Item Types and Message Classes

All items in Outlook are associated with a message class. For example, by default, a mail item is associated with the message class IPM.Note. The message class is primarily used to identify the form that should be used to display the item in Outlook. Outlook supports a list of message classes that are mapped to the types of items built in to Outlook. For more information about message classes, see Item Types and Message Classes.

Users can create custom item types, assign custom message classes to the custom item types, and have Outlook use a custom form to display the custom item types. For example, you may want Outlook to display a custom business contact form for your business contacts. To do that, you can create a custom message class IPM.Contact.Business, create a custom form for this message class, and assign business contacts with this message class.

Registering Conflict Resolution Scheme for Custom Item Types

When you create a custom item type, other than the custom message class and custom form, you should also consider how you would like Outlook to handle conflicts between copies of an item of this item type. By default, because custom item types may define custom fields in the custom form, and may have custom properties and custom code, Outlook employs a resolution scheme common to all items, does not consider properties that are specific to an item type, and presents conflicting copies for the user to make a decision. If you want Outlook to consider item-specific properties and attempt to resolve the conflict with minimal user intervention, you must specify that through a setting in the Windows registry. This can be achieved by either applying a Group Policy setting to the a local computer that sets the following registry key:

[HKCU]SoftwarePoliciesMicrosoftOffice12.0OutlookOptionsConflictMsgCls

Or by directly modifying the following user registry key:

[HKCU]SoftwareMicrosoftOffice12.0OutlookOptionsConflictMsgCls

Setting the conflict resolution through Group Policy takes precedence over directly modifying the user registry key. The location of the key in the registry is dependent on the version of Outlook. You specify the name of the custom message class as a value under this key. Specify the type of the value as DWORD, and the data of the value as one of the following possible values, depending on the resolution scheme you choose:

Data Description
0 Common item resolution requiring user decision, as used in Outlook 2002 and earlier versions.
1 Common item resolution requiring minimal user intervention, as used in Outlook 2003 and Outlook 2007.
2 Resolution specific to mail items.
3 Resolution specific to meeting items.
4 Resolution specific to appointment items.
5 Resolution specific to contact items.
6 Resolution specific to task items.
7 Resolution specific to sticky note items.
8 Resolution specific to journal items.

If you specify one of the item-specific resolution schemes (data2 through 8), Outlook will try to resolve conflicts in item-specific fields (for example, Start and End fields of an appointment item) automatically without user intervention. If Outlook considers that the resolution may result in loss of essential data, Outlook will retain conflicting copies in the Conflicts folder and users can choose to go to the Conflicts folder to manually re-resolve these items and override the automatic resolution.

Using the same business contacts example above, if you want to specify the contact item-specific resolution scheme for the custom message class IPM.Contact.Business, you can add it as a DWORD value under [HKCU]SoftwareMicrosoftOffice12.0OutlookOptionsConflictMsgCls, and specify 5 as the data.

Note

In Outlook 2007 Service Pack 1, Outlook always uses a resolution scheme specific to appointment items for custom message classes that are based on the appointment message class (that is, any custom message class that is preceded by IPM.Appointment, for example, IPM.Appointment.Personal).

Comments

  • Anonymous
    October 16, 2007
    Steve, with ICS available for live Exchange & replication API available  for .pst-based stores, could we get documentation for Cached-mode sync? Thanks!

  • Anonymous
    October 16, 2007
    What specifically are you looking for? IExchangeExportChanges?

  • Anonymous
    October 16, 2007
    I went back to Google & MSDN trying to find more docs on ICS & IExchangeExportChanges and there are NO MSFT docs available at all. So, I'm asking from memory :) 1 )  Are IExchangeExportChanges, IExchangeImportContentsChanges, & IExchangeImportHierarchyChanges fully supported in Cached mode while connected to Exchange? 2 )  The original question was to see if Replication-API-like functionality could be exposed/documented for Cached Mode while Disconnected from Exchange. simple business case: profile ( Exchange Cached + POP account  - exchange store is default ) pt A ) Exchange connected - sync to my app - fine pt B ) Exchange disconnected - get some messages using POP - sync does not work ( IExchangeExportChanges is not available ) pt C ) Changes are made in my App ( appointments ) - still can't sync to Outlook because Cached mode is disconnected ( IExchangeImportContentsChanges is not available ) Thanks!

  • Anonymous
    October 17, 2007
    RE: Docs - yeah - I've been meaning to do something about that... I don't think the PST provider implements sync except when it's acting as an OST, in which case the sync is proxied back to the Exchange server. So I don't think the disconnected case would work. The PST provider has the Replication API - but of course, to use that you pretty much have to be writing a wrapped PST.

  • Anonymous
    October 17, 2007
    Could one write a wrapped PST on top of OST?  I actually tried to use wrapped .PST sample with an OST file and I got "The file [filename.ost] cannot be accessed because it has been configured for use with a different mailbox."

  • Anonymous
    October 17, 2007
    The OST is essentially a wrapped PST.

  • Anonymous
    October 17, 2007
    "The OST is essentially a wrapped PST."  That's clear.  I was just trying to understand: "The PST provider has the Replication API - but of course, to use that you pretty much have to be writing a wrapped PST." in relation to OST.   I was trying to see if there was a way to access the Replication API of a PST through an OST ( to use it when Cached Mode is disconnected through Exchange ).