USP_DATAFORMTEMPLATE_EDITLOAD_PARTICIPANT_EMAIL_TEMPLATE
The load procedure used by the edit dataform template "Participant Email Template 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. |
@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. |
@EVENTID | uniqueidentifier | INOUT | Event |
@CLIENTUSERSID | int | INOUT | Clientusers |
@NAME | nvarchar(255) | INOUT | Name |
@DESCRIPTION | nvarchar(512) | INOUT | Description |
@CONTENTHTML | nvarchar(max) | INOUT | Contenthtml |
@CONTENTTEXT | nvarchar(max) | INOUT | Contenttext |
@SUBJECT | nvarchar(255) | INOUT | Subject |
@CONTACTTYPE | nvarchar(255) | INOUT | Contacttype |
@DELETED | bit | INOUT | Deleted |
@AVAILABLEASLETTER | bit | INOUT | Available as letter |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_PARTICIPANT_EMAIL_TEMPLATE
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@EVENTID uniqueidentifier = null output,
@CLIENTUSERSID int = null output,
@NAME nvarchar(255) = null output,
@DESCRIPTION nvarchar(512) = null output,
@CONTENTHTML nvarchar(max) = null output,
@CONTENTTEXT nvarchar(max) = null output,
@SUBJECT nvarchar(255) = null output,
@CONTACTTYPE nvarchar(255) = null output,
@DELETED bit = null output,
@AVAILABLEASLETTER bit = null output
)
as
set nocount on;
-- be sure to set these, in case the select returns no rows
set @DATALOADED = 0
set @TSLONG = 0
-- populate the output parameters, which correspond to fields on the form. Note that
-- we set @DATALOADED = 1 to indicate that the load was successful. Otherwise, the system
-- will display a "no data loaded" message. Also note that we fetch the TSLONG so that concurrency
-- can be considered.
select
@DATALOADED = 1,
@TSLONG = TSLONG,
@EVENTID = EVENTID,
@CLIENTUSERSID = CLIENTUSERSID,
@NAME = NAME,
@DESCRIPTION = DESCRIPTION,
@CONTENTHTML = CONTENTHTML,
@CONTENTTEXT = CONTENTTEXT,
@SUBJECT = SUBJECT,
@CONTACTTYPE = CONTACTTYPE,
@DELETED = DELETED,
@AVAILABLEASLETTER = AVAILABLEASLETTER
from dbo.PARTICIPANTEMAILTEMPLATE
where ID = @ID
return 0;