USP_DATAFORMTEMPLATE_ADD_FAFPROGRAM_PRELOAD
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CURRENTAPPUSERID | uniqueidentifier | IN | |
@SITEREQUIRED | bit | INOUT | |
@SITES | xml | INOUT |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_FAFPROGRAM_PRELOAD
(
@CURRENTAPPUSERID uniqueidentifier,
@SITEREQUIRED bit = null output,
@SITES xml = null output
)
as
set nocount on;
declare @DEFAULTSITEID uniqueidentifier,
@USERDEFAULTSITEID uniqueidentifier
set @SITEREQUIRED = dbo.UFN_SITEREQUIREDFORUSER(@CURRENTAPPUSERID);
select @USERDEFAULTSITEID = SITEID from dbo.APPUSER where APPUSER.ID = @CURRENTAPPUSERID
set @DEFAULTSITEID = dbo.UFN_APPUSER_DEFAULTSITEFORUSER(@CURRENTAPPUSERID)
if @SITEREQUIRED = 1
begin
if @USERDEFAULTSITEID is null
raiserror('You are not assigned to a default site. To continue, contact your administrator and verify your default site setup.', 13,1);
else
if dbo.UFN_APPUSER_DEFAULTSITEFORUSER(@CURRENTAPPUSERID) is null
raiserror('Your default site is not included in your role''s record access. To continue, contact your administrator and update your role.', 13,1);
end
return 0;