Show / Hide Table of Contents

Class SyncEngine

Inheritance
object
SyncEngine
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.ErpSync
Assembly: SuperOffice.Services.Implementation.dll
Syntax
public class SyncEngine

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
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<SyncEngine>

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
Type Description
Task

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
Type Description
Task

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
Type Description
Task

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
Type Description
Task
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top