| Field Name | Data Type | Size | Original Type | Default | Nullable | Description | Check | 
|---|---|---|---|---|---|---|---|
| TransactionID | int identity | int | Not null | Primary key for TransactionHistory records. | |||
| ProductID | int | Not null | Product identification number. Foreign key to Product.ProductID. | ||||
| ReferenceOrderID | int | Not null | Purchase order, sales order, or work order identification number. | ||||
| ReferenceOrderLineID | int | (0) | Not null | Line number associated with the purchase order, sales order, or work order. | |||
| TransactionDate | datetime | getdate() | Not null | Date and time of the transaction. | |||
| TransactionType | nchar | 1 | Not null | W = WorkOrder, S = SalesOrder, P = PurchaseOrder | (upper([TransactionType])='P' OR upper([TransactionType])='S' OR upper([TransactionType])='W') | ||
| Quantity | int | Not null | Product quantity. | ||||
| ActualCost | money | 19,4 | decimal(19,4) | Not null | Product cost. | ||
| ModifiedDate | datetime | getdate() | Not null | Date and time the record was last updated. | 
The object has no extended properties.
| Primary Key Name | Field Name | 
|---|---|
| PK_TransactionHistory_TransactionID | TransactionID | 
| Foreign | Primary | Key Name | 
|---|---|---|
| TransactionHistory.ProductID | Product.ProductID | FK_TransactionHistory_Product_ProductID | 
| Index Name | Description | Clustered | Unique | Fields | 
|---|---|---|---|---|
| PK_TransactionHistory_TransactionID | Clustered index created by a primary key constraint. | Yes | Yes | TransactionID | 
| IX_TransactionHistory_ProductID | Nonclustered index. | No | No | ProductID | 
| IX_TransactionHistory_ReferenceOrderID_ReferenceOrderLineID | Nonclustered index. | No | No | ReferenceOrderID, ReferenceOrderLineID | 
| Name | Description | Type | Enabled | 
|---|---|---|---|
| uTransactionHistory | AFTER UPDATE trigger setting the ModifiedDate column in the TransactionHistory table to the current date. | after Update | Yes | 
| Object Name | Type | Field Name | 
|---|---|---|
| Production.CK_TransactionHistory_TransactionType | check cns | N/A | 
| Production.iWorkOrder | trigger | N/A | 
| Production.uTransactionHistory | trigger | N/A | 
| Production.uWorkOrder | trigger | N/A | 
| Purchasing.iPurchaseOrderDetail | trigger | N/A | 
| Purchasing.uPurchaseOrderDetail | trigger | N/A | 
| Sales.iduSalesOrderDetail | trigger | N/A |