USP_DATAFORMTEMPLATE_EDITLOAD_MAJORDONORLIFECYCLECRITERIA

The load procedure used by the edit dataform template "Major Donor Lifecycle Edit Data 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.
@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.
@USEMAJORDONORSINGLEGIFT bit INOUT Constituents with a single donation greater than or equal to a specific amount are 'Major donors'.
@MAJORDONORSINGLEGIFTAMOUNT money INOUT Minimum donation amount
@USEMAJORDONORLIFETIMEGIVING bit INOUT Constituents with lifetime giving greater than or equal to a specific amount are 'Major donors'.
@MAJORDONORLIFETIMEGIVINGAMOUNT money INOUT Minimum lifetime giving amount
@INCLUDEMAJORDONORPROSPECTS bit INOUT Constituents with a constituency of 'Major donor prospect' are 'Major donors' even if they have not yet donated.
@PLANNEDGIFTMUSTHAVEPAYMENTS bit INOUT PLANNEDGIFTMUSTHAVEPAYMENTS
@ORGANIZATIONCURRENCYID uniqueidentifier INOUT Organization currency ID

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_MAJORDONORLIFECYCLECRITERIA(
    @ID uniqueidentifier,
    @DATALOADED bit = 0 output,
    @TSLONG bigint = 0 output,
    @USEMAJORDONORSINGLEGIFT bit = null output,
    @MAJORDONORSINGLEGIFTAMOUNT money = null output,
    @USEMAJORDONORLIFETIMEGIVING bit = null output,
    @MAJORDONORLIFETIMEGIVINGAMOUNT money = null output,
    @INCLUDEMAJORDONORPROSPECTS bit = null output,
    @PLANNEDGIFTMUSTHAVEPAYMENTS bit = null output,
    @ORGANIZATIONCURRENCYID uniqueidentifier = null output
)
as

    set nocount on;

    set @DATALOADED = 0
    set @TSLONG = 0

    select
        @DATALOADED = 1,
        @TSLONG = TSLONG,
        @USEMAJORDONORSINGLEGIFT = USEMAJORDONORSINGLEGIFT,
        @MAJORDONORSINGLEGIFTAMOUNT = MAJORDONORSINGLEGIFTAMOUNT,
        @USEMAJORDONORLIFETIMEGIVING = USEMAJORDONORLIFETIMEGIVING,
        @MAJORDONORLIFETIMEGIVINGAMOUNT = MAJORDONORLIFETIMEGIVINGAMOUNT,
        @INCLUDEMAJORDONORPROSPECTS = INCLUDEMAJORDONORPROSPECTS,
        @PLANNEDGIFTMUSTHAVEPAYMENTS = PLANNEDGIFTMUSTHAVEPAYMENTS,
        @ORGANIZATIONCURRENCYID = dbo.UFN_CURRENCY_GETORGANIZATIONCURRENCY()
    from 
        dbo.REVENUELIFECYCLECRITERIA
    where 
        ID = @ID

    return 0;