USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENTMERGEPROCESSPREPROCESS_2

The load procedure used by the edit dataform template "Constituent Merge Preprocess Edit Form 2"

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.
@SOURCETABLEID uniqueidentifier INOUT Duplicate record source
@FILTERSELECTIONID uniqueidentifier INOUT Excluded constituents
@MINSIMILARITY decimal(3, 2) INOUT Minimum match %
@DELETEDUPES bit INOUT Delete source constituents
@CREATEOUTPUTIDSET bit INOUT Create selection from results
@OUTPUTIDSETNAME nvarchar(100) INOUT Selection name
@OVERWRITEOUTPUTIDSET bit INOUT Overwrite existing selection
@CONSTITUENTRECORDTYPEID uniqueidentifier 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.
@NAME nvarchar(100) INOUT Process name
@CONSTITUENTINACTIVITYREASONCODEID uniqueidentifier INOUT Inactive reason
@CONSTITUENTINACTIVITYDETAILS nvarchar(300) INOUT Inactive details

Definition

Copy


                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENTMERGEPROCESSPREPROCESS_2
                    (
                        @ID uniqueidentifier,
                        @DATALOADED bit = 0 output,
                        @SOURCETABLEID uniqueidentifier = null output,
                        @FILTERSELECTIONID uniqueidentifier = null output,
                        @MINSIMILARITY decimal(3,2) = null output,
                        @DELETEDUPES bit = null output,
                        @CREATEOUTPUTIDSET bit = null output,
                        @OUTPUTIDSETNAME nvarchar(100) = null output,
                        @OVERWRITEOUTPUTIDSET bit = null output,
                        @CONSTITUENTRECORDTYPEID uniqueidentifier = null output,
                        @TSLONG bigint = 0 output,
                        @NAME nvarchar(100) = null output,
                        @CONSTITUENTINACTIVITYREASONCODEID uniqueidentifier = null output,
                        @CONSTITUENTINACTIVITYDETAILS nvarchar(300) = null output
                    )
                    as
                        set nocount on;

                        set @DATALOADED = 0;
                        set @TSLONG = 0;

                        select
                            @DATALOADED = 1,
                            @SOURCETABLEID = SOURCETABLEID,
                            @FILTERSELECTIONID = FILTERSELECTIONID,
                            @MINSIMILARITY = MINSIMILARITY,
                            @DELETEDUPES = DELETEDUPES,
                            @CREATEOUTPUTIDSET = CREATEOUTPUTIDSET,
                            @OUTPUTIDSETNAME = OUTPUTIDSETNAME,
                            @OVERWRITEOUTPUTIDSET = OVERWRITEOUTPUTIDSET,
                            @TSLONG = TSLONG,
                            @NAME = NAME,
                            @CONSTITUENTINACTIVITYREASONCODEID = CONSTITUENTINACTIVITYREASONCODEID,
                            @CONSTITUENTINACTIVITYDETAILS = CONSTITUENTINACTIVITYDETAILS
                        from
                            dbo.CONSTITUENTMERGEPROCESS
                        where
                            ID = @ID;

                        select @CONSTITUENTRECORDTYPEID = ID from dbo.RECORDTYPE where upper(NAME) = 'CONSTITUENT';

                        return 0;