USP_DATAFORMTEMPLATE_EDITLOAD_REVENUETRANSACTIONCHANGECONSTITUENT
The load procedure used by the edit dataform template "Revenue Transaction Change Constituent 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. |
@CONSTITUENTNAME | nvarchar(154) | INOUT | Current constituent |
@TYPE | nvarchar(22) | INOUT | Type |
@NEWCONSTITUENTID | uniqueidentifier | INOUT | New constituent |
@RESETRECOGNITIONCREDITS | bit | INOUT | Recognition credit |
@RESETSOLICITORS | bit | INOUT | Solicitors |
@HOUSEHOLDSCANBEDONORS | bit | INOUT | Households can be donors |
@TYPECODE | tinyint | INOUT | |
@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. |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_REVENUETRANSACTIONCHANGECONSTITUENT
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@CONSTITUENTNAME nvarchar(154) = null output,
@TYPE nvarchar(22) = null output,
@NEWCONSTITUENTID uniqueidentifier = null output,
@RESETRECOGNITIONCREDITS bit = null output,
@RESETSOLICITORS bit = null output,
@HOUSEHOLDSCANBEDONORS bit = null output,
@TYPECODE tinyint = null output,
@TSLONG bigint = 0 output
)
as
set nocount on
select top 1
@DATALOADED = 1,
@CONSTITUENTNAME = CONSTITUENT.NAME,
@TYPE = REVENUE.TRANSACTIONTYPE,
@TYPECODE = REVENUE.TRANSACTIONTYPECODE,
@TSLONG = REVENUE.TSLONG
from dbo.REVENUE
inner join dbo.CONSTITUENT on CONSTITUENT.ID = REVENUE.CONSTITUENTID
where REVENUE.ID = @ID
set @RESETRECOGNITIONCREDITS = 0
set @RESETSOLICITORS = 0
set @HOUSEHOLDSCANBEDONORS = dbo.UFN_INSTALLATIONINFO_GETHOUSEHOLDSCANBEDONORS()