Skip to main content

cxSchedulerSynchronizeStorageWithOutlook(TcxCustomSchedulerStorage,TcxCustomSchedulerStorageField,Boolean,TcxAcceptAppointmentItemImportFunc,TcxAppointmentItemToEventProc,TcxSchedulerExchangeProgressProc) Method

Updates the scheduler’s stored data with the items of Microsoft Outlook®.

Declaration

procedure cxSchedulerSynchronizeStorageWithOutlook(AStorage: TcxCustomSchedulerStorage; AppointmentItemIDField: TcxCustomSchedulerStorageField; ADeleteUnsynchronizedEvents: Boolean = False; AcceptFunc: TcxAcceptAppointmentItemImportFunc = nil; AConvertProc: TcxAppointmentItemToEventProc = nil; AProgressProc: TcxSchedulerExchangeProgressProc = nil);

Parameters

Name Type
AStorage TcxCustomSchedulerStorage
AppointmentItemIDField TcxCustomSchedulerStorageField
ADeleteUnsynchronizedEvents Boolean
AcceptFunc TcxAcceptAppointmentItemImportFunc
AConvertProc TcxAppointmentItemToEventProc
AProgressProc TcxSchedulerExchangeProgressProc

Remarks

The AStorage parameter specifies the storage where the imported items will be stored;

The AppointmentItemIDField parameter specifies the dataset field, which will contain ids of the imported items. Make sure that the type of the dataset field is TStringField with the length of at least 140 bytes. Set the TStringField.FixedChar property to False, to specify that the field is of the VARCHAR type. It prevents from spaces to the ID.

The ADeleteUnsynchronizedEvents parameter specifies whether the scheduler’s user events that don’t match Microsoft Outlook’s® items are deleted after the synchronization has been completed (ids are different).

The AcceptFunc parameter specifies a callback reference to a validation function. This function can be implemented by the developer to verify (if required) whether the Microsoft Outlook’s® item can be imported or not prior to the item actually being imported. This function should return a value of True to allow the import or False to cancel it.

The AConvertProc parameter specifies the callback reference to the procedure. The procedure can for instance be used to perform additional conversion operations on the imported user event before it is posted to the scheduler’s storage.

The AProgressProc parameter specifies the callback reference to the progress indication procedure. This procedure can for instance be used to display a status bar to an end-user when synchronization between the scheduler and Microsoft Outlook® is being performed.

Note

export and import of the label color is currently not supported.

Note: to speed up conversion, wrap the cxSchedulerSynchronizeStorageWithOutlook procedure call in calls to the TcxCustomScheduler.BeginUpdate and TcxCustomScheduler.EndUpdate methods, as shown in the following example:

//...
begin
  Scheduler.BeginUpdate;
  try
    cxSchedulerSynchronizeStorageWithOutlook(SchedulerStorage, SchedulerStorage.CustomFields.ItemByName('EntryID'));
  finally
    Scheduler.EndUpdate;
  end;
end;
See Also