LETTERCODE

Stores information pertaining to acknowledgement letters.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
NAME nvarchar(100) Default = '' Name of the letter code.
DESCRIPTION nvarchar(255) Default = '' Description for the letter code.
WORDTEMPLATEFILENAME nvarchar(255) Default = '' Filename of the word template to use for this letter.
WORDFILE varbinary yes The actual template file to use for this letter.
ISACTIVE bit Default = 1 Indicates whether or not the letter code is active.
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.
CUSTOMPARAMETERDATAFORMITEM xml yes Custom parameters for the letter code.
INCLUDESRECEIPT bit Default = 0 Indicates whether or not the marketing letter will serve as a receipt.
NETCOMMUNITYTEMPLATEID int Default = 0 The ID of the Blackbaud Internet Solutions email message associated with this letter
NETCOMMUNITYDATASOURCEID int Default = 0 The ID of the Blackbaud Internet Solutions data source associated with this letter
HTMLTEMPLATE nvarchar(max) Default = '' The html template used for this letter.
ISSYSTEM bit Default = 0 Flag used to hide letters meant for system use only.
MKTEXPORTDEFINITIONID uniqueidentifier (Computed) yes dbo.[UFN_LETTERCODE_GETOBSOLETEMKTEXPORTDEFINITIONID]([EXPORTDEFINITIONID]) Blank, read-only column to provide backward compatibility. Column is obsolete -- use EXPORTDEFINITIONID instead.

Foreign Keys

Foreign Key Field Type Null Notes Description
QUERYVIEWID uniqueidentifier yes QUERYVIEWCATALOG.ID A foreign key to the query view used for this letter.
IDSETREGISTERID uniqueidentifier yes IDSETREGISTER.ID A foreign key to the ID set that will be associated with this letter code.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
SITEID uniqueidentifier yes SITE.ID The site to which this marketing letter belongs.
EXPORTDEFINITIONID uniqueidentifier yes EXPORTDEFINITION.ID A foreign key to the export definition used for this letter.

Indexes

Index Name Fields Unique Primary Clustered
IX_LETTERCODE_DATEADDED DATEADDED yes
IX_LETTERCODE_DATECHANGED DATECHANGED
PK_LETTERCODE ID yes yes
UC_LETTERCODE_NAME NAME yes

Triggers

Trigger Name Description
TR_LETTERCODE_AUDIT_ETLDELETEDID
TR_LETTERCODE_AUDIT_UPDATE
TR_LETTERCODE_AUDIT_DELETE

Referenced by

Referenced by Field
ACKNOWLEDGEMENTPROCESS LETTERCODEID
ASSIGNLETTERCODESPROCESSLETTERCODES LETTERCODEID
BATCHMEMBERSHIPDUES LETTERCODEID
BATCHREVENUE LETTERCODEID
LETTERCODESITE LETTERCODEID
MKTPACKAGE LETTERCODEID
REVENUELETTER LETTERCODEID