USP_DATAFORMTEMPLATE_VIEW_FAF_COMMUNICATIONS_LOG
The load procedure used by the view dataform template "FAF Communications Log View 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. |
@CLIENTUSERSID | int | INOUT | Clientusers |
@ADDRESSBOOKID | uniqueidentifier | INOUT | Addressbook |
@EMAILADDRESS | UDT_EMAILADDRESS | INOUT | Emailaddress |
@MESSAGETYPECODE | tinyint | INOUT | Messagetype |
@DATESENT | datetime | INOUT | Datesent |
@CONSTITUENTID | uniqueidentifier | INOUT | Constituent |
@EMAILJOBID | int | INOUT | EmailJob |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_FAF_COMMUNICATIONS_LOG
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CLIENTUSERSID int = null output,
@ADDRESSBOOKID uniqueidentifier = null output,
@EMAILADDRESS dbo.UDT_EMAILADDRESS = null output,
@MESSAGETYPECODE tinyint = null output,
@DATESENT datetime = null output,
@CONSTITUENTID uniqueidentifier = null output,
@EMAILJOBID int = null output
)
as
set nocount on;
-- be sure to set this, in case the select returns no rows
set @DATALOADED = 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.
select @DATALOADED = 1,
@CLIENTUSERSID = CLIENTUSERSID,
@ADDRESSBOOKID = ADDRESSBOOKID,
@EMAILADDRESS = EMAILADDRESS,
@MESSAGETYPECODE = MESSAGETYPECODE,
@DATESENT = DATESENT,
@CONSTITUENTID = CONSTITUENTID,
@EMAILJOBID = EMAILJOBID
from dbo.FAFCOMMUNICATIONSLOG
where ID = @ID
return 0;