USP_DATAFORMTEMPLATE_EDITLOAD_DONORCHALLENGE
The load procedure used by the edit dataform template "Donor Challenge Edit 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. |
@NAME | nvarchar(100) | INOUT | Challenge Name |
@STARTDATE | datetime | INOUT | Start date |
@ENDDATE | datetime | INOUT | End date |
@PAYPLEDGESWITHIN | tinyint | INOUT | Pay pledges within |
@PAYPLEDGESWITHINUNITCODE | tinyint | INOUT | Pay pledges within units |
@TYPECODE | tinyint | INOUT | Type |
@TOTALFUNDS | money | INOUT | Total funds |
@MATCHINGFACTOR | decimal(5, 2) | INOUT | Matching factor |
@MATCHTHRESHOLD | money | INOUT | Match threshold |
@MATCHTYPECODE | tinyint | INOUT | Matching portion |
@MINGIFTAMOUNT | money | INOUT | Min gift amount |
@MAXMATCHPERGIFT | money | INOUT | Max match per gift |
@REVENUERECOGNITIONTYPECODEID | uniqueidentifier | INOUT | Recognition credit |
@DESCRIPTION | nvarchar(255) | INOUT | Description |
@EXCLUDEDAPPLICATIONTYPES | xml | INOUT | Excluded application types |
@SPLITS | xml | INOUT | Designations |
@TSLONG | bigint | INOUT | Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record. |
@SITEREQUIRED | bit | INOUT | Site Required |
@SITEID | uniqueidentifier | INOUT | Site |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@BASECURRENCYID | uniqueidentifier | INOUT | Base currency ID |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_DONORCHALLENGE(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@NAME nvarchar(100) = null output,
@STARTDATE datetime = null output,
@ENDDATE datetime = null output,
@PAYPLEDGESWITHIN tinyint = null output,
@PAYPLEDGESWITHINUNITCODE tinyint = null output,
@TYPECODE tinyint = null output,
@TOTALFUNDS money = null output,
@MATCHINGFACTOR decimal(5,2) = null output,
@MATCHTHRESHOLD money = null output,
@MATCHTYPECODE tinyint = null output,
@MINGIFTAMOUNT money = null output,
@MAXMATCHPERGIFT money = null output,
@REVENUERECOGNITIONTYPECODEID uniqueidentifier = null output,
@DESCRIPTION nvarchar(255) = null output,
@EXCLUDEDAPPLICATIONTYPES xml = null output,
@SPLITS xml = null output,
@TSLONG bigint = 0 output,
@SITEREQUIRED bit = null output,
@SITEID uniqueidentifier = null output,
@CURRENTAPPUSERID uniqueidentifier,
@BASECURRENCYID uniqueidentifier = null output
)
as
set nocount on;
set @DATALOADED = 0
set @TSLONG = 0
select
@DATALOADED = 1,
@TSLONG = TSLONG,
@NAME = NAME,
@DESCRIPTION = DESCRIPTION,
@TYPECODE = TYPECODE,
@STARTDATE = STARTDATE,
@ENDDATE = ENDDATE,
@TOTALFUNDS = TOTALFUNDS,
@PAYPLEDGESWITHIN = PAYPLEDGESWITHIN,
@PAYPLEDGESWITHINUNITCODE = PAYPLEDGESWITHINUNITCODE,
@MATCHTYPECODE = MATCHTYPECODE,
@MATCHINGFACTOR = MATCHINGFACTOR,
@MATCHTHRESHOLD = MATCHTHRESHOLD,
@MINGIFTAMOUNT = MINGIFTAMOUNT,
@MAXMATCHPERGIFT = MAXMATCHPERGIFT,
@REVENUERECOGNITIONTYPECODEID = REVENUERECOGNITIONTYPECODEID,
@SITEID = SITEID,
@BASECURRENCYID = DONORCHALLENGE.BASECURRENCYID
from dbo.DONORCHALLENGE
where ID = @ID;
set @SPLITS = dbo.UFN_DONORCHALLENGE_GETSPLITS_2_TOITEMLISTXML(@ID);
set @EXCLUDEDAPPLICATIONTYPES = dbo.UFN_DONORCHALLENGE_GETEXCLUDEDAPPLICATIONTYPES_TOITEMLISTXML(@ID);
set @SITEREQUIRED = dbo.UFN_SITEREQUIREDFORUSER(@CURRENTAPPUSERID);
return 0;