Skip to main content

SchedulerDataStorage.SynchronizeStorageWithOutlook(String) Method

Updates Scheduler appointments with MS Outlook’s Calendar entries.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v24.2.dll

Declaration

public void SynchronizeStorageWithOutlook(
    string outlookEntryIdFieldName
)

Parameters

Name Type Description
outlookEntryIdFieldName String

A String that is the name of the data field which contains the Outlook Entry ID value.

Remarks

The SynchronizeStorageWithOutlook method synchronizes the contents of the storage with data from MS Outlook’s Calendar. After synchronization, the storage will contain a copy of the appointments in MS Outlook’s Calendar. If a specific appointment in the storage does not match any appointment in the Calendar it will be deleted.

Every appointment in MS Outlook’s Calendar has a unique identifier. To allow data to be synchronized between the storage and MS Outlook’s Calendar, add a string field to the database which stores appointments for the scheduler control. This field will contain Outlook entry IDs, and it will be automatically populated during synchronization. The method’s outlookEntryFieldName parameter specifies the name of this field.

Before synchronizing the SchedulerDataStorage with MS Outlook, create an additional field in your database. This field should be of the string type with a length of at least 50 characters, and intended to store the Outlook Entry Id for each appointment that is to be synchronized. Assuming the field is called “OutlookEntryId”, you can then use the following code to synchronize the Scheduler Storage with MS Outlook and vice versa.

schedulerControl1.Storage.SynchronizeStorageWithOutlook("OutlookEntryId");

For this example to work correctly, the Scheduler’s data source should provide a field to store the Outlook Entry ID. The filed should be mapped to a custom appointment field, as illustrated below.

schedulerDataStorage.CustomFieldMappings.Add(new AppointmentCustomFieldMapping("OutlookId", "OutlookEntryId"));

Note

If your task is to combine all data from the SchedulerDataStorage and MS Outlook, use the SchedulerDataStorage.ExportToOutlook and SchedulerDataStorage.ImportFromOutlook methods instead. To set custom rules when synchronizing appointments, use the AppointmentExportSynchronizer and the AppointmentImportSynchronizer classes.

See Also