USP_DATAFORMTEMPLATE_ADD_RESEARCHGROUP_PRELOAD
The load procedure used by the edit dataform template "Research Group Add Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@RECORDTYPEID | uniqueidentifier | INOUT | |
@OTHERSCANMODIFY | bit | INOUT | Others can modify |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@SITES | xml | INOUT | Sites |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_RESEARCHGROUP_PRELOAD (
@RECORDTYPEID uniqueidentifier = null output,
@OTHERSCANMODIFY bit = null output,
@CURRENTAPPUSERID uniqueidentifier = null,
@SITES xml = null output
) as
set nocount on;
select
@RECORDTYPEID = ID
from
dbo.RECORDTYPE
where
upper(NAME) = 'CONSTITUENT';
declare @DEFAULTSITEID uniqueidentifier;
set @DEFAULTSITEID = dbo.UFN_APPUSER_DEFAULTSITEFORUSER(@CURRENTAPPUSERID);
if @DEFAULTSITEID is not null
set @SITES = (
select
newid() as ID,
@DEFAULTSITEID as SITEID
for xml raw('ITEM'),type,elements,root('SITES'),BINARY BASE64
);
set @OTHERSCANMODIFY = 1;
return 0;