SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEM

Stores the sales order items that are applied to a membership promotion

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
QUANTITY int Default = 0 Number of items to apply
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

Foreign Key Field Type Null Notes Description
SALESORDERITEMMEMBERSHIPITEMPROMOTIONID uniqueidentifier SALESORDERITEMMEMBERSHIPITEMPROMOTION.ID Applied sales order item for promotion
APPLIEDSALESORDERITEMID uniqueidentifier SALESORDERITEM.ID Sales order item that is applied
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEM_DATEADDED DATEADDED yes
IX_SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEM_DATECHANGED DATECHANGED
PK_SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEM ID yes yes
UIX_SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEM_SALESORDERITEMMEMBERSHIPITEMPROMOTIONID_APPLIEDSALESORDERITEMID SALESORDERITEMMEMBERSHIPITEMPROMOTIONID, APPLIEDSALESORDERITEMID yes

Triggers

Trigger Name Description
TR_SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEM_AUDIT_UPDATE
TR_SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEM_AUDIT_DELETE

Referenced by

Referenced by Field
SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEMTICKET SALESORDERITEMMEMBERSHIPITEMPROMOTIONAPPLIEDITEMID