USP_DATAFORMTEMPLATE_EDITLOAD_PLANPARTICIPANT
The load procedure used by the edit dataform template "Plan Participant Edit Form"
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. |
@CONSTITUENTID | uniqueidentifier | INOUT | Constituent |
@PLANPARTICIPANTROLECODEID | uniqueidentifier | INOUT | Role |
@PROSPECTID | uniqueidentifier | INOUT | |
@HIDDENCONSTITUENTID | uniqueidentifier | INOUT | |
@HIDDENCONSTITUENTNAME | nvarchar(154) | INOUT | |
@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. |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_PLANPARTICIPANT (
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CONSTITUENTID uniqueidentifier = null output,
@PLANPARTICIPANTROLECODEID uniqueidentifier = null output,
@PROSPECTID uniqueidentifier = null output,
@HIDDENCONSTITUENTID uniqueidentifier = null output,
@HIDDENCONSTITUENTNAME nvarchar(154) = null output,
@TSLONG bigint = 0 output
)
as
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@CONSTITUENTID = PLANPARTICIPANT.CONSTITUENTID,
@HIDDENCONSTITUENTID = PLANPARTICIPANT.CONSTITUENTID,
@HIDDENCONSTITUENTNAME = NF.NAME,
@PLANPARTICIPANTROLECODEID = PLANPARTICIPANT.PLANPARTICIPANTROLECODEID,
@PROSPECTID = PROSPECTPLAN.PROSPECTID,
@TSLONG = PLANPARTICIPANT.TSLONG
from
dbo.PLANPARTICIPANT
inner join dbo.PROSPECTPLAN on PLANPARTICIPANT.PROSPECTPLANID = PROSPECTPLAN.ID
outer apply dbo.UFN_CONSTITUENT_DISPLAYNAME(PLANPARTICIPANT.CONSTITUENTID) NF
where
PLANPARTICIPANT.ID = @ID;
return 0;