BATCHCONSTITUENTSOLICITCODE

Stores solicit code records for batch constituent records.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
STARTDATE datetime yes Store the date when the solicit code becomes effective.
ENDDATE datetime yes Store the date when the solicit code expires
COMMENTS nvarchar(100) Default = '' Store comments for this solicit code.
SEQUENCE int Default = 0 Stores the user-defined sequence for solicit codes 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.
CONSENTPREFERENCECODE tinyint Default = 0
CONSENTPREFERENCE nvarchar(11) (Computed) yes CASE [CONSENTPREFERENCECODE] WHEN 0 THEN N'No response' WHEN 1 THEN N'Opt-out' WHEN 2 THEN N'Opt-in' END
SOURCEFILEPATH nvarchar(260) Default = ''
PRIVACYPOLICYFILEPATH nvarchar(260) Default = ''
SUPPORTINGINFORMATION nvarchar(max) Default = ''
CONSENTSTATEMENT nvarchar(max) Default = ''

Foreign Keys

Foreign Key Field Type Null Notes Description
BATCHCONSTITUENTID uniqueidentifier BATCHCONSTITUENT.ID The batch constituent to which this solicit code belongs.
SOLICITCODEID uniqueidentifier SOLICITCODE.ID Store the link to SolicitCode table
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
SOURCECODEID uniqueidentifier yes DATAPROTECTIONEVIDENCESOURCECODE.ID

Indexes

Index Name Fields Unique Primary Clustered
IX_BATCHCONSTITUENTSOLICITCODE_DATEADDED DATEADDED yes
IX_BATCHCONSTITUENTSOLICITCODE_DATECHANGED DATECHANGED
PK_BATCHCONSTITUENTSOLICITCODE ID yes yes

Triggers

Trigger Name Description
TR_BATCHCONSTITUENTSOLICITCODE_AUDIT_UPDATE
TR_BATCHCONSTITUENTSOLICITCODE_AUDIT_DELETE