Table of Contents

Codeunit "Entity Management PSCAP"

ID 70345152
Namespace: CapVision.Online.Webshop.EntityFramework

Properties

Name Value
Access Public

Methods

SetDisableOutboundQueue

Désactive la mise en file des messages sortants. Utilisez principalement ce code lors de l'exécution de mises à jour de données afin d'éviter une synchronisation massive inutile.

procedure SetDisableOutboundQueue(NewDisableOutboundQueue: Boolean)

Parameters

Name Type Description
NewDisableOutboundQueue Boolean

GetPrimaryKeyCodeByEntityId

[TryFunction]
procedure GetPrimaryKeyCodeByEntityId(EntityType: Enum "Entity PSCAP"; Id: Integer; var PKCode: Code[20]): Boolean

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
PKCode Code[20]

Returns

Type Description
Boolean

GetPrimaryKeyCodeByEntityId

procedure GetPrimaryKeyCodeByEntityId(EntityType: Enum "Entity PSCAP"; Id: Integer; AllowSync: Boolean): Code[20]

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
AllowSync Boolean

Returns

Type Description
Code[20]

GetRecordByEntityId

procedure GetRecordByEntityId(EntityType: Enum "Entity PSCAP"; Id: Integer; AllowSync: Boolean; var RecRef: RecordRef): Boolean

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
AllowSync Boolean
RecRef RecordRef

Returns

Type Description
Boolean

MapEntityToExistingRecordBeforeInsert

procedure MapEntityToExistingRecordBeforeInsert(EntityType: Enum "Entity PSCAP"; Id: Integer; XEntity: XmlDocument; var Rec: Variant)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
XEntity XmlDocument
Rec Variant

GetRecordSystemIdByEntityId

procedure GetRecordSystemIdByEntityId(EntityType: Enum "Entity PSCAP"; Id: Integer; AllowSync: Boolean): Guid

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
AllowSync Boolean

Returns

Type Description
Guid

GetEntityIdByRecordSystemId

procedure GetEntityIdByRecordSystemId(EntityType: Enum "Entity PSCAP"; RecordSystemId: Guid): Integer

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
RecordSystemId Guid

Returns

Type Description
Integer

GetEntityIdByPrimaryKeyCode

procedure GetEntityIdByPrimaryKeyCode(EntityType: Enum "Entity PSCAP"; PKCode: Code[20]): Integer

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
PKCode Code[20]

Returns

Type Description
Integer

RegisterIntegrationRecord

procedure RegisterIntegrationRecord(EntityType: Enum "Entity PSCAP"; Id: Integer; SystemId: Guid)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
SystemId Guid

UnregisterIntegrationRecord

procedure UnregisterIntegrationRecord(EntityType: Enum "Entity PSCAP"; Id: Integer)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer

UpdateIntegrationRecord

procedure UpdateIntegrationRecord(EntityType: Enum "Entity PSCAP"; Id: Integer; UpdateDateTime: DateTime)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
UpdateDateTime DateTime

FetchEntity

procedure FetchEntity(EntityType: Enum "Entity PSCAP"; Id: Integer): Integer

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer

Returns

Type Description
Integer

EnqueueOutboundMessage

procedure EnqueueOutboundMessage(EntityType: Enum "Entity PSCAP"; RecordSystemId: Guid): Integer

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
RecordSystemId Guid

Returns

Type Description
Integer

EnqueueOutboundMessage

procedure EnqueueOutboundMessage(EntityType: Enum "Entity PSCAP"; RecordSystemId: Guid; Force: Boolean): Integer

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
RecordSystemId Guid
Force Boolean

Returns

Type Description
Integer

FillOutboundMessage

procedure FillOutboundMessage(var OutboundMessage: Record "Outbound Message PSCAP"; RecordFound: Boolean; Id: Integer; var XResource: XmlDocument): Boolean

Parameters

Name Type Description
OutboundMessage Table CapVision.Online.Webshop.Messages."Outbound Message PSCAP"
RecordFound Boolean
Id Integer
XResource XmlDocument

Returns

Type Description
Boolean

GetDefaultTranslation

procedure GetDefaultTranslation(Category: Record "Category PSCAP"; MetadataType: Enum "Metadata Type PSCAP"): Text

Parameters

Name Type Description
Category Table CapVision.Online.Webshop.Item."Category PSCAP"
MetadataType Enum CapVision.Online.Webshop."Metadata Type PSCAP"

Returns

Type Description
Text

GetDefaultTranslation

procedure GetDefaultTranslation(OrderState: Record "Order State PSCAP"; MetadataType: Enum "Metadata Type PSCAP"): Text

Parameters

Name Type Description
OrderState Table CapVision.Online.Webshop."Order State PSCAP"
MetadataType Enum CapVision.Online.Webshop."Metadata Type PSCAP"

Returns

Type Description
Text

GetDefaultTranslation

procedure GetDefaultTranslation(Translations: Dictionary of [Integer, Text]): Text

Parameters

Name Type Description
Translations Dictionary of [Integer, Text]

Returns

Type Description
Text

PopulateTranslations

procedure PopulateTranslations(XEntity: XmlDocument; TranslationsXPath: Text): Dictionary of [Integer, Text]

Parameters

Name Type Description
XEntity XmlDocument
TranslationsXPath Text

Returns

Type Description
Dictionary of [Integer, Text]

RetrieveIdSet

procedure RetrieveIdSet(XEntity: XmlDocument; XPath: Text): List of [Integer]

Parameters

Name Type Description
XEntity XmlDocument
XPath Text

Returns

Type Description
List of [Integer]

RetrieveMap

procedure RetrieveMap(XEntity: XmlDocument; XPath: Text; XKeyPath: Text; XValuePath: Text; var KeyIds: List of [Integer]; var ValueIds: List of [Integer])

Parameters

Name Type Description
XEntity XmlDocument
XPath Text
XKeyPath Text
XValuePath Text
KeyIds List of [Integer]
ValueIds List of [Integer]

GetBackofficeHyperlink

procedure GetBackofficeHyperlink(EntityType: Enum "Entity PSCAP"; EntityId: Integer): Text

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
EntityId Integer

Returns

Type Description
Text

OpenBackoffice

procedure OpenBackoffice(EntityType: Enum "Entity PSCAP"; EntityId: Integer)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
EntityId Integer

OpenBackoffice

procedure OpenBackoffice(EntityType: Enum "Entity PSCAP"; SystemId: Guid)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
SystemId Guid

Events

OnBeforeGetRecordSystemIdByEntityId

[IntegrationEvent(False,False)]
local procedure OnBeforeGetRecordSystemIdByEntityId(EntityType: Enum "Entity PSCAP"; Id: Integer; AllowSync: Boolean; var IntegrationRecord: Record "Integration Record PSCAP"; var Handled: Boolean)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
AllowSync Boolean
IntegrationRecord Table CapVision.Online.Webshop.EntityFramework."Integration Record PSCAP"
Handled Boolean

OnAfterGetRecordSystemIdByEntityId

[IntegrationEvent(False,False)]
local procedure OnAfterGetRecordSystemIdByEntityId(EntityType: Enum "Entity PSCAP"; Id: Integer; AllowSync: Boolean; var IntegrationRecord: Record "Integration Record PSCAP")

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
AllowSync Boolean
IntegrationRecord Table CapVision.Online.Webshop.EntityFramework."Integration Record PSCAP"

OnGetBackofficeHyperlink

[IntegrationEvent(False,False)]
local procedure OnGetBackofficeHyperlink(EntityType: Enum "Entity PSCAP"; EntityId: Integer; var QueryString: Text)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
EntityId Integer
QueryString Text

OnMapEntityToExistingRecordBeforeInsert

[IntegrationEvent(False,False)]
local procedure OnMapEntityToExistingRecordBeforeInsert(EntityType: Enum "Entity PSCAP"; Id: Integer; XEntity: XmlDocument; var Rec: Variant; var Handled: Boolean)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
XEntity XmlDocument
Rec Variant
Handled Boolean

OnBeforeEnqueueOutboundMessage

[IntegrationEvent(False,False)]
local procedure OnBeforeEnqueueOutboundMessage(EntityType: Enum "Entity PSCAP"; RecordSystemId: Guid; Force: Boolean; var EntryNo: Integer; var Handled: Boolean)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
RecordSystemId Guid
Force Boolean
EntryNo Integer
Handled Boolean

OnBeforeEnqueueInboundMessage

[IntegrationEvent(False,False)]
local procedure OnBeforeEnqueueInboundMessage(EntityType: Enum "Entity PSCAP"; Id: Integer; XEntity: XmlNode; var Handled: Boolean)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
Id Integer
XEntity XmlNode
Handled Boolean

OnBeforeReadFetchEntityPage

[IntegrationEvent(False,False)]
local procedure OnBeforeReadFetchEntityPage(EntityType: Enum "Entity PSCAP"; PreviewMode: Boolean; var QueryStringParameters: Dictionary of [Text, Text])

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
PreviewMode Boolean
QueryStringParameters Dictionary of [Text, Text]

OnBeforeFetchEntity

[IntegrationEvent(False,False)]
local procedure OnBeforeFetchEntity(EntityType: Enum "Entity PSCAP"; PreviewMode: Boolean; var FetchMode: Enum "Fetch Mode PSCAP"; var LimitPerPage: Integer)

Parameters

Name Type Description
EntityType Enum CapVision.Online.Webshop.EntityFramework."Entity PSCAP"
PreviewMode Boolean
FetchMode Enum CapVision.Online.Webshop.EntityFramework."Fetch Mode PSCAP"
LimitPerPage Integer

See also