Class SyncEngine
Assembly: SuperOffice.Services.Implementation.dll
Syntax
Properties
InitErrors
Declaration
public List<PluginResponseInfo> InitErrors { get; }
Property Value
Type |
Description |
List<PluginResponseInfo> |
|
Methods
CreateAsync(CancellationToken)
Sets up all connections (including CRM), checks to see if they're up and running and makes EIS ready for running.
Declaration
public static Task<SyncEngine> CreateAsync(CancellationToken cancellationToken = default)
Parameters
Returns
ForceResync(int, ErpActorType, string[], bool)
Forces a resync from a given ERP connection.
The given actors are synced to all other active connections (ERP and CRM).
Declaration
public Task ForceResync(int erpConnectionId, ErpActorType eat, string[] externalKeys, bool noBlankValues = false)
Parameters
Type |
Name |
Description |
int |
erpConnectionId |
Erp connection to sync actors from. Set to 0 to sync from CRM
|
ErpActorType |
eat |
|
string[] |
externalKeys |
The external keys of the actors to resync (erpkeys). If NULL or empty, all connected actors will be resynced.
|
bool |
noBlankValues |
|
Returns
ForceResyncAsync(int, int[], bool)
Forces a resync from a given connection. Set ErpConnection to 0 (zero) to sync from CRM, or select an active ERP connection ID to sync from that connection.
The given actors are synced to all other active connections (ERP and CRM).
Declaration
public Task ForceResyncAsync(int erpConnectionId, int[] internalKeyIds, bool noBlankValues = false)
Parameters
Type |
Name |
Description |
int |
erpConnectionId |
Erp connection to sync actors from. Set to 0 to sync from CRM
|
int[] |
internalKeyIds |
The internal keys of the actors to resync. If NULL or empty, all connected actors will be resynced.
|
bool |
noBlankValues |
|
Returns
RunSyncAsync(bool)
Triggers a sync operation, which asks every active connection (both CRM and ERP) for its updated actors.
These changes are then synced to every other connection where that actor is connected
Declaration
public Task RunSyncAsync(bool force = false)
Parameters
Type |
Name |
Description |
bool |
force |
|
Returns
StartSyncTimer()
Starts the sync timer, which will run the sync operation at a specified interval
Declaration
public void StartSyncTimer()
StopSyncTimer()
Stops the sync timer (Note: does not stop an ongoing sync operation)
Declaration
public void StopSyncTimer()
SyncErpActorsToCrmAsync(int, ErpActorType, string[])
Declaration
public static Task SyncErpActorsToCrmAsync(int sourceConnectionId, ErpActorType actorType, string[] erpKeys)
Parameters
Type |
Name |
Description |
int |
sourceConnectionId |
|
ErpActorType |
actorType |
|
string[] |
erpKeys |
|
Returns