EMAILADDRESS

The EMAILADDRESS table stores email addresses associated with a given constituent.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
EMAILADDRESS UDT_EMAILADDRESS Default = '' The constituent's email address.
ISPRIMARY bit Default = 0 Indicates this email address is the primary email address.
SEQUENCE int Default = 0 Stores the user-defined sequence for email addresses on a constituent.
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.
DONOTEMAIL bit Default = 0 Indicates this email address should not receive emails.
INFOSOURCECOMMENTS nvarchar(256) Default = '' Contains additional comments about the information source.
ORIGINCODE tinyint Default = 0 Defines where the address originated.
ORIGIN nvarchar(9) (Computed) yes CASE [ORIGINCODE] WHEN 0 THEN N'User' WHEN 1 THEN N'Web Forms' END Provides a translation for the 'ORIGINCODE' field.
STARTDATE datetime yes The date the email address becomes valid.
ENDDATE datetime yes The date the email address becomes invalid.
ISCONFIDENTIAL bit Default = 0

Foreign Keys

Foreign Key Field Type Null Notes Description
CONSTITUENTID uniqueidentifier CONSTITUENT.LOCALID FK to CONSTITUENT
EMAILADDRESSTYPECODEID uniqueidentifier yes EMAILADDRESSTYPECODE.ID FK to EMAILADDRESSTYPECODE
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
INFOSOURCECODEID uniqueidentifier yes INFOSOURCECODE.ID FK to INFOSOURCECODE
RELATIONSHIPID uniqueidentifier yes RELATIONSHIP.ID Stores the relationship ID this email address is associated with.
DONOTEMAILREASONCODEID uniqueidentifier yes DONOTEMAILREASONCODE.ID

Indexes

Index Name Fields Unique Primary Clustered
IX_EMAILADDRESS_CONSTITUENTID_ISPRIMARY CONSTITUENTID, ISPRIMARY
IX_EMAILADDRESS_DATEADDED DATEADDED yes
IX_EMAILADDRESS_DATECHANGED DATECHANGED
IX_EMAILADDRESS_EMAILADDRESS EMAILADDRESS
IX_EMAILADDRESS_ID ID
IX_EMAILADDRESS_RELATIONSHIPID RELATIONSHIPID
PK_EMAILADDRESS ID yes yes

Triggers

Trigger Name Description
TR_EMAILADDRESS_AUDIT_ETLDELETEDID
TR_EMAILADDRESS_TASYNC_I
TR_EMAILADDRESS_TASYNC_U
TR_EMAILADDRESS_TASYNC_D
TR_EMAILADDRESS_AUDIT_UPDATE
TR_EMAILADDRESS_AUDIT_DELETE

Referenced by

Referenced by Field
BATCHCONSTITUENTUPDATEEMAILADDRESSES EMAILADDRESSID
BATCHEVENTSPONSORSHIP EMAILADDRESSID
DONATIONBATCH EMAILADDRESSID
MAILPREFERENCE EMAILADDRESSID
MAILPREFERENCEGROUPCONTACT EMAILADDRESSID
REGISTRANTBATCH EMAILADDRESSID
SALESORDER EMAILADDRESSID