Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 NAME nvarchar(100)   Default = '' The name of the letter template.
 DESCRIPTION nvarchar(255)   Default = '' The description of the letter template.
 LETTERFILE varbinary   The actual file.
 LETTERFILENAME nvarchar(255)   Default = '' The file name of the letter template.
 LETTERTEMPLATETYPECODE tinyint   Default = 0 The type of the letter template.
 CUSTOMPARAMETERDATAFORMITEM xml Custom parameters for the process.
 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) CONVERT(bigint, TS) Numeric representation of the timestamp.
 LETTERTEMPLATETYPE nvarchar(28) (Computed) CASE [LETTERTEMPLATETYPECODE] WHEN 0 THEN N'Acknowledgement' WHEN 1 THEN N'Planned gift acknowledgement' WHEN 2 THEN N'Pledge reminder' WHEN 3 THEN N'Receipt' WHEN 4 THEN N'Correspondence' WHEN 5 THEN N'Constituent letter' WHEN 6 THEN N'Tribute acknowledgement' WHEN 7 THEN N'Group sales contract' WHEN 8 THEN N'Membership card' END Provides a translation for the 'LETTERTEMPLATETYPECODE' field.

Foreign Key Field Type Null Notes Description
 QUERYVIEWID uniqueidentifier QUERYVIEWCATALOG.ID A foreign key to the query view used as output format for this letter.
 SITEID uniqueidentifier SITE.ID A foreign key to the site table.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 EXPORTDEFINITIONID uniqueidentifier EXPORTDEFINITION.ID A foreign key to the export definition table.

Index Name Field(s) Unique Primary Clustered
 IX_LETTERTEMPLATE_DATEADDED DATEADDED    
 IX_LETTERTEMPLATE_DATECHANGED DATECHANGED      
 PK_LETTERTEMPLATE ID  
 UC_LETTERTEMPLATE_NAME NAME    

Trigger Name Description
 TR_LETTERTEMPLATE_AUDIT_UPDATE
 TR_LETTERTEMPLATE_AUDIT_DELETE

Referenced by Field
 GROUPSALESDEFAULT CONTRACTLETTERTEMPLATEID
 MEMBERSHIPPROGRAM LETTERTEMPLATEID
 PRINTMEMBERSHIPCARDSPROCESS LETTERTEMPLATEID

Entity-Relationship diagram of this table