Show / Hide Table of Contents

Class CrmConnectionHandlerFacade

Inheritance
object
ConnectionHandlerFacadeBase
CrmConnectionHandlerFacade
Inherited Members
ConnectionHandlerFacadeBase._ConnectionId
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 CrmConnectionHandlerFacade : ConnectionHandlerFacadeBase

Methods

CreateActorAsync(ErpSyncActor, ErpActorType)

Creates a new actor and returns the actor from the connection as if looks after the create operation (e.g. with a new ErpKey and timestamp, etc)

Declaration
public override Task<ErpSyncActor> CreateActorAsync(ErpSyncActor act, ErpActorType actorType)
Parameters
Type Name Description
ErpSyncActor act
ErpActorType actorType
Returns
Type Description
Task<ErpSyncActor>
Overrides
ConnectionHandlerFacadeBase.CreateActorAsync(ErpSyncActor, ErpActorType)

GetActorAsync(int, int)

Declaration
public Task<ErpSyncActor> GetActorAsync(int recordId, int tableId)
Parameters
Type Name Description
int recordId
int tableId
Returns
Type Description
Task<ErpSyncActor>

GetActorsAsync(ErpActorType, string[])

Retrieves a specified set of actors. Will use the field mapping for the given actor type and connection.

Declaration
public override Task<ErpSyncActor[]> GetActorsAsync(ErpActorType actorType, string[] CrmKeys)
Parameters
Type Name Description
ErpActorType actorType
string[] CrmKeys
Returns
Type Description
Task<ErpSyncActor[]>
Overrides
ConnectionHandlerFacadeBase.GetActorsAsync(ErpActorType, string[])

GetConfigDataAsync()

Declaration
protected override Task<FieldMetadataInfo[]> GetConfigDataAsync()
Returns
Type Description
Task<FieldMetadataInfo[]>
Overrides
ConnectionHandlerFacadeBase.GetConfigDataAsync()

GetConnectionIdAsync()

The connection ID identifying the CRM connection internally in EIS. Because we can only ever have one CRM connection, and because we don't need to store the connection configuration data anywhere, this GUID does not have to persist between sessions, and can be generated every time the connection is opened.

Declaration
public override Task<Guid> GetConnectionIdAsync()
Returns
Type Description
Task<Guid>
Overrides
ConnectionHandlerFacadeBase.GetConnectionIdAsync()

GetCrmActorTypeFromInternalKeyIdAsync(int, CancellationToken)

Declaration
public static Task<CrmActorType> GetCrmActorTypeFromInternalKeyIdAsync(int internalKeyId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int internalKeyId
CancellationToken cancellationToken
Returns
Type Description
Task<CrmActorType>

GetCrmActorTypeFromTableId(int)

Declaration
public static CrmActorType GetCrmActorTypeFromTableId(int tableId)
Parameters
Type Name Description
int tableId
Returns
Type Description
CrmActorType

GetErpConnectionIdAsync()

The CRM connection does not have an ErpConnectionId. This method will always return 0

Declaration
public override Task<int> GetErpConnectionIdAsync()
Returns
Type Description
Task<int>
Overrides
ConnectionHandlerFacadeBase.GetErpConnectionIdAsync()

GetInternalKeyAsync(int, int, CancellationToken)

Declaration
public static Task<int> GetInternalKeyAsync(int recordId, int tableId, CancellationToken cancellationToken = default)
Parameters
Type Name Description
int recordId
int tableId
CancellationToken cancellationToken
Returns
Type Description
Task<int>

GetListAsync(string)

Retrieves an entire list with a given name

Declaration
public override Task<Dictionary<string, string>> GetListAsync(string listName)
Parameters
Type Name Description
string listName
Returns
Type Description
Task<Dictionary<string, string>>
Overrides
ConnectionHandlerFacadeBase.GetListAsync(string)

GetListItemsAsync(string, string[])

Retrieves a specific set of list items from a given list

Declaration
public override Task<Dictionary<string, string>> GetListItemsAsync(string listName, string[] listItemKeys)
Parameters
Type Name Description
string listName
string[] listItemKeys
Returns
Type Description
Task<Dictionary<string, string>>
Overrides
ConnectionHandlerFacadeBase.GetListItemsAsync(string, string[])

GetSupportedActorTypeFieldsAsync(ErpActorType)

Retrieves supported fields for a specific actor type

Declaration
public override Task<FieldMetadataInfo[]> GetSupportedActorTypeFieldsAsync(ErpActorType actorType)
Parameters
Type Name Description
ErpActorType actorType
Returns
Type Description
Task<FieldMetadataInfo[]>
Overrides
ConnectionHandlerFacadeBase.GetSupportedActorTypeFieldsAsync(ErpActorType)

GetSupportedActorTypesAsync()

Retrieves supported actor types for the CRM connection

Declaration
public override Task<string[]> GetSupportedActorTypesAsync()
Returns
Type Description
Task<string[]>
Overrides
ConnectionHandlerFacadeBase.GetSupportedActorTypesAsync()

GetTableIdFromCrmActorType(CrmActorType)

Declaration
public static int GetTableIdFromCrmActorType(CrmActorType crmActTp)
Parameters
Type Name Description
CrmActorType crmActTp
Returns
Type Description
int

GetUpdatedActorsAsync()

Retrieves an entire list with a given name

Declaration
public override Task<ErpSyncActor[]> GetUpdatedActorsAsync()
Returns
Type Description
Task<ErpSyncActor[]>
Overrides
ConnectionHandlerFacadeBase.GetUpdatedActorsAsync()

OpenConnectionAsync(CancellationToken)

Opens or retrieves the CRM connection handler

Declaration
public static Task<CrmConnectionHandlerFacade> OpenConnectionAsync(CancellationToken cancellationToken = default)
Parameters
Type Name Description
CancellationToken cancellationToken
Returns
Type Description
Task<CrmConnectionHandlerFacade>

SaveActorTimestampAsync(ErpSyncActor, CancellationToken)

If the timestamp of the given actor is larger than the currently stored timestamp from the database (ErpExternalKey row), the new timestamp is stored to the database.

Declaration
public override Task SaveActorTimestampAsync(ErpSyncActor act, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ErpSyncActor act
CancellationToken cancellationToken
Returns
Type Description
Task
Overrides
ConnectionHandlerFacadeBase.SaveActorTimestampAsync(ErpSyncActor, CancellationToken)

SaveActorsAsync(ErpSyncActor[])

Saves a set of actors to the connection and returns those same actors with their updated values from the ERP system (new timestamp, possibly new field values, etc)

Declaration
public override Task<ErpSyncActor[]> SaveActorsAsync(ErpSyncActor[] actors)
Parameters
Type Name Description
ErpSyncActor[] actors
Returns
Type Description
Task<ErpSyncActor[]>
Overrides
ConnectionHandlerFacadeBase.SaveActorsAsync(ErpSyncActor[])

SaveActorsAsync(ErpSyncActor[], bool)

Saves a set of actors to the connection and returns those same actors with their updated values from the ERP system (new timestamp, possibly new field values, etc)

Declaration
public override Task<ErpSyncActor[]> SaveActorsAsync(ErpSyncActor[] actors, bool noBlankValues)
Parameters
Type Name Description
ErpSyncActor[] actors
bool noBlankValues
Returns
Type Description
Task<ErpSyncActor[]>
Overrides
ConnectionHandlerFacadeBase.SaveActorsAsync(ErpSyncActor[], bool)

SaveConnectionAsync(Dictionary<string, string>)

Declaration
public override Task<PluginResponseInfo> SaveConnectionAsync(Dictionary<string, string> connectionInfo)
Parameters
Type Name Description
Dictionary<string, string> connectionInfo
Returns
Type Description
Task<PluginResponseInfo>
Overrides
ConnectionHandlerFacadeBase.SaveConnectionAsync(Dictionary<string, string>)

SaveConnectionTimestampAsync(ErpSyncActor, CancellationToken)

If the timestamp of the given actor is larger than the currently stored timestamp from the database (ErpInternalKey row), the new timestamp is stored to the database.

Declaration
public override Task SaveConnectionTimestampAsync(ErpSyncActor act, CancellationToken cancellationToken = default)
Parameters
Type Name Description
ErpSyncActor act
CancellationToken cancellationToken
Returns
Type Description
Task
Overrides
ConnectionHandlerFacadeBase.SaveConnectionTimestampAsync(ErpSyncActor, CancellationToken)

SearchActorByParentAsync(ErpActorType, string, ErpActorType, string)

Searches for actors with a specified parent actor using a given search string. Will use the field mapping for the given actor type and connection.

Declaration
public override Task<ErpSyncActor[]> SearchActorByParentAsync(ErpActorType actorType, string searchText, ErpActorType parentActorType, string parentActorErpKey)
Parameters
Type Name Description
ErpActorType actorType
string searchText
ErpActorType parentActorType
string parentActorErpKey
Returns
Type Description
Task<ErpSyncActor[]>
Overrides
ConnectionHandlerFacadeBase.SearchActorByParentAsync(ErpActorType, string, ErpActorType, string)

SearchActorsAsync(ErpActorType, string)

Searches for actors using a given search string. Will use the field mapping for the given actor type and connection.

Declaration
public override Task<ErpSyncActor[]> SearchActorsAsync(ErpActorType actorType, string searchText)
Parameters
Type Name Description
ErpActorType actorType
string searchText
Returns
Type Description
Task<ErpSyncActor[]>
Overrides
ConnectionHandlerFacadeBase.SearchActorsAsync(ErpActorType, string)

SearchActorsAsync(ErpActorType, string, string[])

Declaration
public override Task<ErpSyncActor[]> SearchActorsAsync(ErpActorType actorType, string searchText, string[] fieldKeys)
Parameters
Type Name Description
ErpActorType actorType
string searchText
string[] fieldKeys
Returns
Type Description
Task<ErpSyncActor[]>
Overrides
ConnectionHandlerFacadeBase.SearchActorsAsync(ErpActorType, string, string[])

SetConnectionIdAsync(Guid)

The connection ID identifying the CRM connection internally in EIS. Because we can only ever have one CRM connection, and because we don't need to store the connection configuration data anywhere, this GUID does not have to persist between sessions, and can be generated every time the connection is opened.

Declaration
protected override Task SetConnectionIdAsync(Guid value)
Parameters
Type Name Description
Guid value
Returns
Type Description
Task
Overrides
ConnectionHandlerFacadeBase.SetConnectionIdAsync(Guid)

SetErpConnectionIdAsync(int)

The CRM connection does not have an ErpConnectionId. This method will always return 0

Declaration
protected override Task SetErpConnectionIdAsync(int value)
Parameters
Type Name Description
int value
Returns
Type Description
Task
Overrides
ConnectionHandlerFacadeBase.SetErpConnectionIdAsync(int)

TestConnectionAsync()

Checks to see if the connection is active

Declaration
public override Task<PluginResponseInfo> TestConnectionAsync()
Returns
Type Description
Task<PluginResponseInfo>
Overrides
ConnectionHandlerFacadeBase.TestConnectionAsync()
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top