Table

RetailTransactionAffiliationTrans

Affiliations for transactions

Records which affiliations and loyalty tiers apply to a retail transaction. Each row is identified by affiliation, loyalty tier, channel, store, register and transaction number. It links to the affiliation, the loyalty tier and the transaction.

Table name
RetailTransactionAffiliationTrans
Module
Commerce transactions and orders
Table group
Transaction
Table type
Regular
Data per company
Yes
Configuration key
Retail
Primary index
AffiliationTxnIdx
Replacement key
AffiliationTxnIdx
Key fields
Affiliation, LoyaltyTier, Channel, StoreId, TerminalId, TransactionId
Model
Foundation

Fields (21)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
AffiliationAffiliation (loyalty programme) record this row refers to.Int64
RefRecId
NoRetailAffiliation.RecIdRetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more
LoyaltyTierLoyalty tier record this row refers to.Int64
RefRecId
NoRetailLoyaltyTier.RecIdRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityRetailTransactionAffiliationTransBIEntity
ChannelRetail channel of the transaction, pointing to the channel record.Int64
RetailChannelRecId
NoRetailChannelTable.RecIdRetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more
StoreIdNumber of the store, pointing to the store record.String
RetailStoreId
YesRetailStoreTable.StoreNumberRetailTransactionAffiliationTransEntityRetailTransactionAffiliationTransBIEntity
TerminalIdNumber of the POS register, pointing to the register record.String
RetailTerminalId
YesRetailTerminalTable.terminalIdRetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more
TransactionIdNumber of the retail transaction, matched together with channel, store and register.String (44)
RetailTransactionId
YesRetailTransactionTable.transactionIdRetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more
CreatedByThe user who created the record. System field.String (20)
CreatedBy
NoRetailTransactionAffiliationTransBIEntity
CreatedDateTimeThe date and time when the record was created. System field.UtcDateTime
CreatedDateTime
NoRetailTransactionAffiliationTransBIEntity
CreatedTransactionIdA system number for the database transaction that created the record. System field.Int64
CreatedTransactionId
NoNone
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoRetailTransactionAffiliationTransBIEntity
ModifiedByThe user who last changed the record. System field.String (20)
ModifiedBy
NoRetailTransactionAffiliationTransBIEntity
ModifiedDateTimeThe date and time when the record was last changed. System field.UtcDateTime
ModifiedDateTime
NoRetailTransactionAffiliationTransBIEntity
ModifiedTransactionIdA system number for the database transaction that last changed the record. System field.Int64
ModifiedTransactionId
NoNone
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
ReceiptIdReceipt number of the transaction.String (18)
RetailReceiptId
NoRetailTransactionAffiliationLineEntityRetailTransactionAffiliationTransEntityRetailTransactionLoyaltyLineEntityand 1 more
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoRetailTransactionAffiliationTransBIEntity
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoNone
replicationCounterFromOriginCounter used to track replication from the source location.Integer
RetailReplicationCounter
NoRetailTransactionAffiliationTransEntityRetailTransactionAffiliationTransBIEntity
StaffIdID of the operator who handled the transaction.String (25)
RetailStaffId
NoRetailTransactionAffiliationTransEntityRetailTransactionAffiliationTransBIEntity
SysRowVersionA system row version number that is used for change tracking. System field.Int64
SysRowVersion
NoNone
TableIdA system number that identifies the table. System field.Integer
TableId
NoNone

Indexes (1)

Relations (6)

Each relation joins RetailTransactionAffiliationTrans to another table on the fields shown.

  • RetailAffiliation → RetailAffiliation

    Join on Affiliation = RetailAffiliation.RecId

    Many RetailTransactionAffiliationTrans records → zero or one RetailAffiliation record

  • RetailChannelTable → RetailChannelTable

    Join on Channel = RetailChannelTable.RecId

    Many RetailTransactionAffiliationTrans records → exactly one RetailChannelTable record

  • RetailLoyaltyTier → RetailLoyaltyTier

    Join on LoyaltyTier = RetailLoyaltyTier.RecId

    Many RetailTransactionAffiliationTrans records → zero or one RetailLoyaltyTier record

  • RetailStoreTable → RetailStoreTable

    Join on StoreId = RetailStoreTable.StoreNumber

    Many RetailTransactionAffiliationTrans records → exactly one RetailStoreTable record

  • RetailTerminalTable → RetailTerminalTable

    Join on TerminalId = RetailTerminalTable.terminalId

    Many RetailTransactionAffiliationTrans records → exactly one RetailTerminalTable record

  • RetailTransactionTable → RetailTransactionTable

    Join on Channel = RetailTransactionTable.Channel, TransactionId = RetailTransactionTable.transactionId, StoreId = RetailTransactionTable.store, TerminalId = RetailTransactionTable.terminal

    Many RetailTransactionAffiliationTrans records → zero or one RetailTransactionTable record

Get this data out

Tables are not exposed directly. These public entities read from RetailTransactionAffiliationTrans; use one of them in Power BI, Power Platform or a data management project.

Need help with RetailTransactionAffiliationTrans in a report, an integration or a migration? Talk to Dr Dynamics.

Email sales@drdynamics.co.uk