cxSchedulerSynchronizeOutlookWithStorage(TcxCustomSchedulerStorage,TcxCustomSchedulerStorageField,Boolean,TcxAcceptEventExportFunc,TcxEventToAppointmentItemProc,TcxSchedulerExchangeProgressProc) Method
Updates Microsoft Outlook® with the scheduler’s stored data.
Declaration
procedure cxSchedulerSynchronizeOutlookWithStorage(AStorage: TcxCustomSchedulerStorage; AppointmentItemIDField: TcxCustomSchedulerStorageField; ADeleteUnsynchronizedAppointments: Boolean = False; AcceptFunc: TcxAcceptEventExportFunc = nil; AConvertProc: TcxEventToAppointmentItemProc = nil; AProgressProc: TcxSchedulerExchangeProgressProc = nil);
Parameters
Name | Type |
---|---|
AStorage | TcxCustomSchedulerStorage |
AppointmentItemIDField | TcxCustomSchedulerStorageField |
ADeleteUnsynchronizedAppointments | Boolean |
AcceptFunc | TcxAcceptEventExportFunc |
AConvertProc | TcxEventToAppointmentItemProc |
AProgressProc | TcxSchedulerExchangeProgressProc |
Remarks
The AStorage parameter specifies the storage, which the scheduler’s user events will be retrieved from;
The AppointmentItemIDField parameter specifies the dataset field, which contains unique identifiers of the user events. If the specified field doesn’t store IDs, then the required IDs will be generated automatically. Make certain 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 ADeleteUnsynchronizedAppointments parameter specifies whether Microsoft Outlook’s® items which don’t match the scheduler’s user events 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 scheduler’s user event can be exported prior to the user event actually being exported to Microsoft Outlook®. This function should return a value of True to allow the export 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 user event‘s clone (the Microsoft Outlook’s® item) before it’s transferred to Microsoft Outlook®.
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 cxSchedulerSynchronizeOutlookWithStorage procedure call in calls to the TcxCustomScheduler.BeginUpdate and TcxCustomScheduler.EndUpdate methods, as shown in the following example:
//...
begin
Scheduler.BeginUpdate;
try
cxSchedulerSynchronizeOutlookWithStorage(SchedulerStorage, SchedulerStorage.CustomFields.ItemByName('EntryID'));
finally
Scheduler.EndUpdate;
end;
end;