USP_DATAFORMTEMPLATE_PRELOAD_ADD_PLEDGEFROMCONSTITUENT
The load procedure used by the edit dataform template "Pledge From Constituent Add Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@SINGLEDESIGNATIONID | uniqueidentifier | INOUT | Designation |
@HOUSEHOLDSCANBEDONORS | bit | INOUT | Households can be donors |
@CONTEXTID | uniqueidentifier | IN | Input parameter indicating the context ID for the record being added. |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@PDACCOUNTSYSTEMID | uniqueidentifier | INOUT | Account system |
@SHOWACCOUNTSYSTEM | bit | INOUT | Show Account System |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_PRELOAD_ADD_PLEDGEFROMCONSTITUENT
(
@SINGLEDESIGNATIONID uniqueidentifier = null output,
@HOUSEHOLDSCANBEDONORS bit = null output,
@CONTEXTID uniqueidentifier,
@CURRENTAPPUSERID uniqueidentifier = null,
@PDACCOUNTSYSTEMID uniqueidentifier = null output,
@SHOWACCOUNTSYSTEM bit = null output
)
as
set nocount on;
-- Leaving SINGLEDESIGNATIONID as null. No value needs to be set for it since
-- it existed as a readonly field before the load SP was added.
set @HOUSEHOLDSCANBEDONORS = dbo.UFN_INSTALLATIONINFO_GETHOUSEHOLDSCANBEDONORS()
if dbo.UFN_VALID_BASICGL_INSTALLED() != 0
begin
declare @NUMBEROFACCOUNTSYSTEMSFORUSER smallint
set @NUMBEROFACCOUNTSYSTEMSFORUSER = dbo.UFN_PDACCOUNTSYSTEM_GETNUMBEROFSYSTEMSFORUSER(@CURRENTAPPUSERID)
if @NUMBEROFACCOUNTSYSTEMSFORUSER = 1
begin
set @SHOWACCOUNTSYSTEM = 0
select @PDACCOUNTSYSTEMID = T1.ID from dbo.UFN_PDACCOUNTSYSTEM_GETSYSTEMIDSFORUSER(@CURRENTAPPUSERID) as T1
end
else
begin
set @SHOWACCOUNTSYSTEM = 1
set @PDACCOUNTSYSTEMID = dbo.UFN_PDACCOUNTSYSTEM_GETDEFAULTSYSTEMIDSFORUSER(@CURRENTAPPUSERID)
end
end
else
begin
set @SHOWACCOUNTSYSTEM = 0
set @PDACCOUNTSYSTEMID = '4B121C2C-CCE6-440D-894C-EA0DEF80D50B'
end