| Primary Key | Field Type | 
|---|---|
  ID | 
        uniqueidentifier | 
| Field | Field Type | Null | Notes | Description | 
|---|---|---|---|---|
  NAME | 
        nvarchar(100) | Default = '' | Name of the correspondence code. | |
  DESCRIPTION | 
        nvarchar(255) | Default = '' | Description of the correspondence code. | |
  ISACTIVE | 
        bit | Default = 1 | Indicates whether the 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) | ![]()  | 
        CONVERT(bigint, TS) | Numeric representation of the timestamp. | 
| Foreign Key | Field Type | Null | Notes | Description | 
|---|---|---|---|---|
  ADDEDBYID | 
        uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
  CHANGEDBYID | 
        uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
  CATEGORYCODEID | 
        uniqueidentifier | ![]()  | 
        CORRESPONDENCECATEGORYCODE.ID | Category of the correspondence code. | 
  SITEID | 
        uniqueidentifier | ![]()  | 
        SITE.ID | The site with which a correspondence code is associated. | 
| Index Name | Field(s) | Unique | Primary | Clustered | 
|---|---|---|---|---|
  IX_CORRESPONDENCECODE_DATEADDED | 
        DATEADDED | ![]()  | 
    ||
  IX_CORRESPONDENCECODE_DATECHANGED | 
        DATECHANGED | |||
  IX_CORRESPONDENCECODE_SITEID | 
        SITEID | |||
  PK_CORRESPONDENCECODE | 
        ID | ![]()  | 
        ![]()  | 
        |
  UC_CORRESPONDENCECODE_NAME | 
        NAME | ![]()  | 
        
| Trigger Name | Description | 
|---|---|
  TR_CORRESPONDENCECODE_AUDIT_UPDATE | 
        |
  TR_CORRESPONDENCECODE_AUDIT_DELETE | 
        
| Referenced by | Field | 
|---|---|
  CONSTITUENTCORRESPONDENCE | 
        CORRESPONDENCECODEID | 
  CORRESPONDENCEPROCESS | 
        CORRESPONDENCECODEID | 
  MAILPREFERENCE | 
        CORRESPONDENCECODEID | 

 ID
 NAME
 TSLONG
 ADDEDBYID
 IX_CORRESPONDENCECODE_DATEADDED
 IX_CORRESPONDENCECODE_DATECHANGED