InitiateFullSynchronization Procedure
Performs any initialization of a full synchronization.
This can be used to override the default functionality for full synchronization or to perform any actions that should take place before the full synchronization is processed.
Signature
InitiateFullSynchronization(ExternalSystem: Record "QWESR External System"; ExternalSubsystemCode: Code[20]; SetupLineNo: Integer) : Enum "QWESR Full Sync. Response"
Parameters
ExternalSystem
Record "QWESR External System"
The External System that has triggered this function.
ExternalSubsystemCode
Code[20]
This is blank if the full synchronization will be processed for all subsystems, if any exists. If this parameter has a value, the full synchronization has been triggered for the provided external subsystem only.
SetupLineNo
Integer
If this has a non-zero value, the full synchronization has been triggered for a specific line in the "QWESR Ext. Sys. Sync Stp (Tbl)"
table. Otherwise this will be 0.
Returns
Enum "QWESR Full Sync. Response"
The following values are supported:
- IsHandled if the full synchronization is taken care of, and no change log entries should be created or synchronization started.
- RecreateAllLogEntriesAndSync if all change log entries for this external system should be deleted and created and a synchronization should be processed.
- KeepDeletedAndCreateAllLogEntriesAndSync if change log entries with Change Type equal to Deleted should be kept, all others deleted and recreated. After that a synchronization should be processed.
Remarks
This function must return a valid value, other than the default value (blank). Otherwise an error will be thrown.
Example
Custom full synchronization
Processes some custom logic for the full synchronization, overriding the default functionality:
procedure InitiateFullSynchronization(ExternalSystem: Record "QWESR External System"; ExternalSubsystemCode: Code[20]; SetupLineNo: Integer): Enum "QWESR Full Sync. Response";
begin
PerformSpecialFullSync(ExternalSystem, ExternalSubsystemCode, SetupLineNo);
exit(Enum::"QWESR Full Sync. Response"::IsHandled);
end;
Delete remote data
Processes some custom logic to delete all remote data, before all data is sent again:
procedure InitiateFullSynchronization(ExternalSystem: Record "QWESR External System"; ExternalSubsystemCode: Code[20]; SetupLineNo: Integer): Enum "QWESR Full Sync. Response";
begin
DeleteRemoteData(ExternalSystem, ExternalSubsystemCode, SetupLineNo);
exit(Enum::"QWESR Full Sync. Response"::RecreateAllLogEntriesAndSync);
end;
Keep deleted change entries
When all log entries are created for the full synchronization, any existing log entries with the Change Type
equals to Deleted
will be kept.
This is needed if the remote system does contain data before the full synchronization takes place.
procedure InitiateFullSynchronization(ExternalSystem: Record "QWESR External System"; ExternalSubsystemCode: Code[20]; SetupLineNo: Integer): Enum "QWESR Full Sync. Response";
begin
exit(Enum::"QWESR Full Sync. Response"::KeepDeletedAndCreateAllLogEntriesAndSync);
end;
This documentation is generated from Spider v26.0.242160.0