Table

RetailLog

Log

Stores log and audit entries written by Commerce channels, stores and POS registers. Each entry has a level, an event type, a date and time, and a log message. It can link to a channel, store, register and shift, and records how the entry was uploaded.

Table name
RetailLog
Module
Commerce
Table group
Transaction
Table type
Regular
Data per company
Yes
Configuration key
Retail
Primary index
IdIdx
Replacement key
None
Key fields
ChannelId, StoreId, terminalId, RetailLogId, UploadType
Model
Foundation

Fields (27)

Field and descriptionType / EDT / enumMandatoryReferencesIn public entities
ChannelIdRetail channel the entry belongs to. Points to the channel by system record ID.Int64
RefRecId
NoRetailChannelTable.RecIdRetailLogEntity
StoreIdStore where the entry was logged. Points to the store record.String
RetailStoreId
YesRetailStoreTable.StoreNumberRetailLogEntity
terminalIdPOS register where the entry was logged. Points to the register record.String
RetailTerminalId
YesRetailTerminalTable.terminalIdRetailLogEntity
RetailLogIdIdentifier of the log entry. It forms part of the table key.Int64
RetailLogIdentifier
YesRetailLogEntity
UploadTypeHow the entry reached the back office: async service, real-time service or back office.Enum
RetailAuditEventUploadType (enum)
NoRetailLogEntity
BatchIdShift the entry belongs to. Points to the POS shift record for the same store and register.Int64
RetailPosBatchID
YesRetailPosBatchTable.BatchIDRetailLogEntity
ClosedBatchIdShift ID of a closed shift. The metadata gives no relation, so the exact use is unclear.low confidenceInt64
RetailPosBatchID
NoRetailLogEntity
CodeUnitName of the code unit that wrote the log entry.String (100)
RetailCodeUnit
NoRetailLogEntity
ContactPersonIdID of the customer contact person linked to the entry.String (20)
ContactPersonId
NoRetailLogEntity
CustAccountCustomer account linked to the entry.String (20)
CustAccount
NoRetailLogEntity
DataAreaIdThe company (legal entity) that the record belongs to. System field.String (4)
DataAreaId
NoNone
durationInMilliSecHow long the logged action took. The label says ticks but the field name says milliseconds, so the unit is unclear.low confidenceInteger
RetailDurationInMilliSec
NoRetailLogEntity
EntityReferenceIdIdentifier of the related entity that the log entry refers to.String (40)
RetailLogEntityReferenceId
NoRetailLogEntity
EventTypeKind of audited event, such as logon, logoff, manager override, item voided or price check.Enum
RetailAuditEventType (enum)
NoRetailLogEntity
IdNumeric ID labelled as a receipt format. Its exact meaning is not clear from the metadata.low confidenceInteger
RetailLogId
YesRetailLogEntity
LogDateDate of the log entry.Date
RetailDateEx5
NoRetailLogEntity
LogLevelSeverity of the entry: trace, debug or error.Enum
RetailLogLevel
RetailLogLevelBase (enum)
NoRetailLogEntity
LogStringFree-text content of the log message.String (-1)
RetailLogString
NoRetailLogEntity
LogTimeTime of the log entry.Time
RetailLogTime
NoRetailLogEntity
OriginNumber of the location that the entry came from.String (50)
RetailConnDistributionLocationId
NoRetailLogEntity
PartitionA system field for the data partition. In most environments every record has the same value. System field.Int64
Partition
NoNone
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field.Int64
RecId
NoNone
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field.Integer
RecVersion
NoNone
replicationCounterFromOriginCounter value from the origin location, used to track replication of the entry.Integer
RetailReplicationCounter
NoRetailLogEntity
StaffIdID of the operator linked to the entry.String (25)
RetailStaffId
NoRetailLogEntity
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 (2)

Relations (4)

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

  • RetailStoreTable → RetailStoreTable

    Join on StoreId = RetailStoreTable.StoreNumber

    Many RetailLog records → exactly one RetailStoreTable record

  • RetailTerminalTable → RetailTerminalTable

    Join on terminalId = RetailTerminalTable.terminalId

    Many RetailLog records → exactly one RetailTerminalTable record

  • RetailChannelTable → RetailChannelTable

    Join on ChannelId = RetailChannelTable.RecId

    Many RetailLog records → exactly one RetailChannelTable record

  • RetailPosBatchTable → RetailPosBatchTable

    Join on BatchId = RetailPosBatchTable.BatchID, TerminalId = RetailPosBatchTable.TerminalId, StoreId = RetailPosBatchTable.StoreId

    Many RetailLog records → exactly one RetailPosBatchTable record

Get this data out

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

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

Email sales@drdynamics.co.uk