MAILPREFERENCEORGCONTACTTYPE

Maps Mail Preferences to Contact Types.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
USEPRIMARYCONTACT bit Default = 0 If true, use the primary contact, regardless of Contact Type.
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
MAILPREFERENCEID uniqueidentifier yes MAILPREFERENCE.ID The Mail Preference.
CONTACTTYPECODEID uniqueidentifier yes CONTACTTYPECODE.LOCALID The Contact Type.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_MAILPREFERENCEORGCONTACTTYPE_DATEADDED DATEADDED yes
IX_MAILPREFERENCEORGCONTACTTYPE_DATECHANGED DATECHANGED
IX_MAILPREFERENCEORGCONTACTTYPE_MAILPREFERENCEID MAILPREFERENCEID
PK_MAILPREFERENCEORGCONTACTTYPE ID yes yes

Triggers

Trigger Name Description
TR_MAILPREFERENCEORGCONTACTTYPE_AUDIT_UPDATE
TR_MAILPREFERENCEORGCONTACTTYPE_AUDIT_DELETE