CAMPAIGNGOAL
A goal for a campaign.
Primary Key
Primary Key | Field Type |
---|---|
ID | uniqueidentifier |
Fields
Field | Field Type | Null | Notes | Description |
---|---|---|---|---|
AMOUNT | money | Default = 0 | The amount of the goal in the campaign's base currency. | |
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. |
ORGANIZATIONAMOUNT | money | Default = 0 | The amount of the goal in organization currency. |
Foreign Keys
Foreign Key | Field Type | Null | Notes | Description |
---|---|---|---|---|
CAMPAIGNID | uniqueidentifier | CAMPAIGN.LOCALID | The campaign the goal is for. | |
CAMPAIGNHIERARCHYGOALID | uniqueidentifier | CAMPAIGNHIERARCHYGOAL.ID | The hierarchy goal that this goal supports. | |
ADDEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CHANGEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
CURRENCYEXCHANGERATEID | uniqueidentifier | yes | CURRENCYEXCHANGERATE.ID | The exchange rate used to convert from amount to organization amount. |
Indexes
Index Name | Fields | Unique | Primary | Clustered |
---|---|---|---|---|
IX_CAMPAIGNGOAL_CURRENCYEXCHANGERATEID | CURRENCYEXCHANGERATEID | |||
IX_CAMPAIGNGOAL_DATEADDED | DATEADDED | yes | ||
IX_CAMPAIGNGOAL_DATECHANGED | DATECHANGED | |||
PK_CAMPAIGNGOAL | ID | yes | yes | |
UIX_CAMPAIGNGOAL_CAMPAIGNID_CAMPAIGNHIERARCHYGOALID | CAMPAIGNID, CAMPAIGNHIERARCHYGOALID | yes |
Triggers
Trigger Name | Description |
---|---|
TR_CAMPAIGNGOAL_IU_ORGANIZATIONAMOUNT | |
TR_CAMPAIGNGOAL_AUDIT_UPDATE | |
TR_CAMPAIGNGOAL_AUDIT_DELETE | |
TR_CAMPAIGNGOAL_T2BDELETE | |
TR_CAMPAIGNGOAL_AUDIT_ETLDELETEDID |