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 description | Type / EDT / enum | Mandatory | References | In public entities |
|---|---|---|---|---|
ChannelIdRetail channel the entry belongs to. Points to the channel by system record ID. | Int64RefRecId | No | RetailChannelTable.RecId | RetailLogEntity |
StoreIdStore where the entry was logged. Points to the store record. | StringRetailStoreId | Yes | RetailStoreTable.StoreNumber | RetailLogEntity |
terminalIdPOS register where the entry was logged. Points to the register record. | StringRetailTerminalId | Yes | RetailTerminalTable.terminalId | RetailLogEntity |
RetailLogIdIdentifier of the log entry. It forms part of the table key. | Int64RetailLogIdentifier | Yes | RetailLogEntity | |
UploadTypeHow the entry reached the back office: async service, real-time service or back office. | EnumRetailAuditEventUploadType (enum) | No | RetailLogEntity | |
BatchIdShift the entry belongs to. Points to the POS shift record for the same store and register. | Int64RetailPosBatchID | Yes | RetailPosBatchTable.BatchID | RetailLogEntity |
ClosedBatchIdShift ID of a closed shift. The metadata gives no relation, so the exact use is unclear.low confidence | Int64RetailPosBatchID | No | RetailLogEntity | |
CodeUnitName of the code unit that wrote the log entry. | String (100)RetailCodeUnit | No | RetailLogEntity | |
ContactPersonIdID of the customer contact person linked to the entry. | String (20)ContactPersonId | No | RetailLogEntity | |
CustAccountCustomer account linked to the entry. | String (20)CustAccount | No | RetailLogEntity | |
DataAreaIdThe company (legal entity) that the record belongs to. System field. | String (4)DataAreaId | No | None | |
durationInMilliSecHow long the logged action took. The label says ticks but the field name says milliseconds, so the unit is unclear.low confidence | IntegerRetailDurationInMilliSec | No | RetailLogEntity | |
EntityReferenceIdIdentifier of the related entity that the log entry refers to. | String (40)RetailLogEntityReferenceId | No | RetailLogEntity | |
EventTypeKind of audited event, such as logon, logoff, manager override, item voided or price check. | EnumRetailAuditEventType (enum) | No | RetailLogEntity | |
IdNumeric ID labelled as a receipt format. Its exact meaning is not clear from the metadata.low confidence | IntegerRetailLogId | Yes | RetailLogEntity | |
LogDateDate of the log entry. | DateRetailDateEx5 | No | RetailLogEntity | |
LogLevelSeverity of the entry: trace, debug or error. | EnumRetailLogLevelRetailLogLevelBase (enum) | No | RetailLogEntity | |
LogStringFree-text content of the log message. | String (-1)RetailLogString | No | RetailLogEntity | |
LogTimeTime of the log entry. | TimeRetailLogTime | No | RetailLogEntity | |
OriginNumber of the location that the entry came from. | String (50)RetailConnDistributionLocationId | No | RetailLogEntity | |
PartitionA system field for the data partition. In most environments every record has the same value. System field. | Int64Partition | No | None | |
RecIdA unique number that the system gives to every record. Other tables often use it to point to this record. System field. | Int64RecId | No | None | |
RecVersionA system number that changes each time the record is updated. It is used to detect conflicting updates. System field. | IntegerRecVersion | No | None | |
replicationCounterFromOriginCounter value from the origin location, used to track replication of the entry. | IntegerRetailReplicationCounter | No | RetailLogEntity | |
StaffIdID of the operator linked to the entry. | String (25)RetailStaffId | No | RetailLogEntity | |
SysRowVersionA system row version number that is used for change tracking. System field. | Int64SysRowVersion | No | None | |
TableIdA system number that identifies the table. System field. | IntegerTableId | No | None |
Indexes (2)
IdIdxPrimary indexChannelId,StoreId,terminalId,RetailLogId,UploadTypeUnique, alternate key.
LocationIdxOrigin,replicationCounterFromOriginNot unique.
Relations (4)
Each relation joins RetailLog to another table on the fields shown.
RetailStoreTable→RetailStoreTableJoin on
StoreId = RetailStoreTable.StoreNumberMany RetailLog records → exactly one RetailStoreTable record
RetailTerminalTable→RetailTerminalTableJoin on
terminalId = RetailTerminalTable.terminalIdMany RetailLog records → exactly one RetailTerminalTable record
RetailChannelTable→RetailChannelTableJoin on
ChannelId = RetailChannelTable.RecIdMany RetailLog records → exactly one RetailChannelTable record
RetailPosBatchTable→RetailPosBatchTableJoin on
BatchId = RetailPosBatchTable.BatchID,TerminalId = RetailPosBatchTable.TerminalId,StoreId = RetailPosBatchTable.StoreIdMany 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.
RetailLogEntity· 21 fields from this table
Need help with RetailLog in a report, an integration or a migration? Talk to Dr Dynamics.