USP_DATAFORMTEMPLATE_EDITLOAD_CMSNOTIFICATION_EMAILANDROLE
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | int | IN | |
@DATALOADED | bit | INOUT | |
@CMSNOTIFICATIONEMAILADDRESSES | xml | INOUT | |
@CMSNOTIFICATIONROLES | xml | INOUT |
Definition
Copy
create procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_CMSNOTIFICATION_EMAILANDROLE(
@ID int,
@DATALOADED bit = 0 output,
@CMSNOTIFICATIONEMAILADDRESSES xml = null output,
@CMSNOTIFICATIONROLES xml= null output
)
as
set nocount on;
-- be sure to set these, 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. Also note that we fetch the TSLONG so that concurrency
-- can be considered.
if exists(select * from dbo.NC_Notification where ID = @ID)
set @DATALOADED = 1;
select @CMSNOTIFICATIONEMAILADDRESSES = dbo.UFN_CMSNOTIFICATION_GETEMAILADDRESSES_TOITEMLISTXML(@ID);
select @CMSNOTIFICATIONROLES = dbo.UFN_CMSNOTIFICATION_GETROLES_TOITEMLISTXML(@ID);
return 0;