USP_DATAFORMTEMPLATE_VIEW_EXCHANGEEMAILBODY
The load procedure used by the view dataform template "Exchange Email Body 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. |
@CONSTITUENTNAME | nvarchar(154) | INOUT | Constituent name |
@APPUSERNAME | nvarchar(154) | INOUT | User name |
@BODY | nvarchar(max) | INOUT | BODY |
Definition
Copy
CREATE procedure [dbo].[USP_DATAFORMTEMPLATE_VIEW_EXCHANGEEMAILBODY] (
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CONSTITUENTNAME nvarchar(154) = null output,
@APPUSERNAME nvarchar(154) = null output,
@BODY nvarchar(max) = null output
) as
set nocount on;
set @DATALOADED = 0;
select
@DATALOADED = 1,
@CONSTITUENTNAME = dbo.ufn_constituent_buildname(e.CONSTITUENTID),
@APPUSERNAME = case when dbo.ufn_constituent_buildname(a.CONSTITUENTID) <> '' then dbo.ufn_constituent_buildname(a.CONSTITUENTID) else dbo.ufn_appuser_getname(a.ID) end,
@BODY = BODY
from
dbo.EXCHANGEEMAILBATCH e
left join dbo.APPUSER a on e.USERID = a.ID
where
e.ID = @ID;
return 0;