SPONSORSHIPPROGRAM
Sponsorship Program
Primary Key
| Primary Key | Field Type | 
|---|---|
| ID | uniqueidentifier | 
Fields
| Field | Field Type | Null | Notes | Description | 
|---|---|---|---|---|
| NAME | nvarchar(100) | Default = '' | Name of the sponsorship program | |
| AMOUNT | money | Default = 0 | Amount of Sponsorship Program | |
| SEQUENCE | int | Default = 0 | User defined sequence for the program | |
| ISINACTIVE | bit | Default = 0 | Indicates whether or not the program is inactive. | |
| FILTERLOCATIONCODE | tinyint | Default = 0 | 0=Any, 1=In, 2=Not in | |
| FILTERLOCATION | nvarchar(6) (Computed) | yes | CASE [FILTERLOCATIONCODE] WHEN 0 THEN N'Any' WHEN 1 THEN N'In' WHEN 2 THEN N'Not in' END | Provides a translation for the 'FILTERLOCATIONCODE' field. | 
| FILTERLOCATIONS | xml | yes | A set of location filters to apply to the opportunity group when selecting opportunities for this program. | |
| 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. | 
Foreign Keys
| Foreign Key | Field Type | Null | Notes | Description | 
|---|---|---|---|---|
| SPONSORSHIPOPPORTUNITYGROUPID | uniqueidentifier | SPONSORSHIPOPPORTUNITYGROUP.ID | The opportunity group from which this program obtains its opportunities. | |
| SPONSORSHIPGREATESTNEEDRULESETID | uniqueidentifier | SPONSORSHIPGREATESTNEEDRULESET.ID | FK to SPONSORSHIPGREATESTNEEDRULESET | |
| MATCHFUNCTIONID | uniqueidentifier | SQLFUNCTIONCATALOG.ID | FK to SQLFUNCTIONCATALOG | |
| ADDEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
| CHANGEDBYID | uniqueidentifier | CHANGEAGENT.ID | FK to CHANGEAGENT. | |
| QUERYVIEWID | uniqueidentifier | QUERYVIEWCATALOG.ID | FK to QUERYVIEWCATALOG | |
| BASECURRENCYID | uniqueidentifier | yes | CURRENCY.ID | FK to CURRENCY | 
Indexes
| Index Name | Fields | Unique | Primary | Clustered | 
|---|---|---|---|---|
| IX_SPONSORSHIPPROGRAM_BASECURRENCYID | BASECURRENCYID | |||
| IX_SPONSORSHIPPROGRAM_DATEADDED | DATEADDED | yes | ||
| IX_SPONSORSHIPPROGRAM_DATECHANGED | DATECHANGED | |||
| IX_SPONSORSHIPPROGRAM_SPONSORSHIPGREATESTNEEDRULESETID | SPONSORSHIPGREATESTNEEDRULESETID | |||
| IX_SPONSORSHIPPROGRAM_SPONSORSHIPOPPORTUNITYGROUPID | SPONSORSHIPOPPORTUNITYGROUPID | |||
| PK_SPONSORSHIPPROGRAM | ID | yes | yes | |
| UC_SPONSORSHIPPROGRAM_MATCHFUNCTIONID | MATCHFUNCTIONID | yes | ||
| UC_SPONSORSHIPPROGRAM_NAME | NAME | yes | ||
| UC_SPONSORSHIPPROGRAM_QUERYVIEWID | QUERYVIEWID | yes | 
Triggers
| Trigger Name | Description | 
|---|---|
| TR_SPONSORSHIPPROGRAM_INSERTUPDATE_CURRENCY | |
| TR_SPONSORSHIPPROGRAM_AUDIT_UPDATE | |
| TR_SPONSORSHIPPROGRAM_AUDIT_DELETE | 
Referenced by
| Referenced by | Field | 
|---|---|
| BATCHSPONSORSHIP | SPONSORSHIPPROGRAMID | 
| SALESORDERITEMSPONSORSHIP | SPONSORSHIPPROGRAMID | 
| SPONSORSHIP | SPONSORSHIPPROGRAMID | 
| SPONSORSHIPAFFILIATEPROGRAM | ID | 
| SPONSORSHIPTRANSFERPROCESS | SPONSORSHIPPROGRAMID |