USP_DATAFORMTEMPLATE_EDITLOAD_CONTACTREPORT
The load procedure used by the edit dataform template "Contact Report Edit"
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
| @DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
| @TSLONG | bigint | INOUT | Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record. |
| @PROSPECTPLANID | uniqueidentifier | INOUT | Prospect plan ID |
| @ACTUALDATE | datetime | INOUT | Actual date |
| @OWNERID | uniqueidentifier | INOUT | Owner |
| @INTERACTIONTYPECODEID | uniqueidentifier | INOUT | Contact Method |
| @OBJECTIVE | nvarchar(100) | INOUT | Objective |
| @COMMENT | nvarchar(max) | INOUT | Comment |
| @PROSPECTPLANSTATUSCODEID | uniqueidentifier | INOUT | Stage |
| @ADDITIONALFUNDRAISERS | xml | INOUT | Additional solicitors |
| @PARTICIPANTS | xml | INOUT | Participants |
| @INTERACTIONCATEGORYID | uniqueidentifier | INOUT | Category |
| @INTERACTIONSUBCATEGORYID | uniqueidentifier | INOUT | Subcategory |
| @ACTUALSTARTTIME | UDT_HOURMINUTE | INOUT | Actual start time |
| @ACTUALENDTIME | UDT_HOURMINUTE | INOUT | Actual end time |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_CONTACTREPORT
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@PROSPECTPLANID uniqueidentifier = null output,
@ACTUALDATE datetime = null output,
@OWNERID uniqueidentifier = null output,
@INTERACTIONTYPECODEID uniqueidentifier = null output,
@OBJECTIVE nvarchar(100) = null output,
@COMMENT nvarchar(max) = null output,
@PROSPECTPLANSTATUSCODEID uniqueidentifier = null output,
@ADDITIONALFUNDRAISERS xml = null output,
@PARTICIPANTS xml = null output,
@INTERACTIONCATEGORYID uniqueidentifier = null output,
@INTERACTIONSUBCATEGORYID uniqueidentifier = null output,
@ACTUALSTARTTIME dbo.UDT_HOURMINUTE = null output,
@ACTUALENDTIME dbo.UDT_HOURMINUTE = null output
) as begin
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@TSLONG = INTERACTION.TSLONG,
@PROSPECTPLANID = INTERACTION.PROSPECTPLANID,
@ACTUALDATE = INTERACTION.ACTUALDATE,
@OWNERID = INTERACTION.FUNDRAISERID,
@INTERACTIONTYPECODEID = INTERACTION.INTERACTIONTYPECODEID,
@OBJECTIVE = INTERACTION.OBJECTIVE,
@COMMENT = INTERACTION.COMMENT,
@PROSPECTPLANSTATUSCODEID = INTERACTION.PROSPECTPLANSTATUSCODEID,
@ADDITIONALFUNDRAISERS = dbo.UFN_INTERACTION_ADDITIONALFUNDRAISERS_TOITEMLISTXML(INTERACTION.ID),
@PARTICIPANTS = dbo.UFN_INTERACTION_PARTICIPANTS_TOITEMLISTXML(INTERACTION.ID),
@INTERACTIONCATEGORYID = INTERACTIONSUBCATEGORY.INTERACTIONCATEGORYID,
@INTERACTIONSUBCATEGORYID = INTERACTIONSUBCATEGORY.ID,
@ACTUALSTARTTIME = INTERACTION.ACTUALSTARTTIME,
@ACTUALENDTIME = INTERACTION.ACTUALENDTIME
from dbo.INTERACTION
left outer join dbo.INTERACTIONSUBCATEGORY on INTERACTION.INTERACTIONSUBCATEGORYID = INTERACTIONSUBCATEGORY.ID
where
INTERACTION.ID = @ID
return 0;
end