USP_DATAFORMTEMPLATE_EDIT_BATCHPEOPLEFINDERBATCHROW_2
The save procedure used by the edit dataform template "PeopleFinder Batch Row Edit Form".
Parameters
| Parameter | Parameter Type | Mode | Description | 
|---|---|---|---|
| @ID | uniqueidentifier | IN | The input ID parameter indicating the ID of the record being edited. | 
| @CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the procedure. | 
| @SEQUENCE | int | IN | Sequence | 
| @PEOPLEFINDERID | uniqueidentifier | IN | |
| @CONSTITUENTID | uniqueidentifier | IN | Constituent | 
| @OLDADDRESSID | uniqueidentifier | IN | |
| @NEWADDRESSBLOCK | nvarchar(150) | IN | New address | 
| @NEWCITY | nvarchar(50) | IN | New city | 
| @NEWPOSTCODE | nvarchar(12) | IN | New zip | 
| @OTHERLASTNAME | nvarchar(100) | IN | Other last name | 
| @NEWPHONENUMBER | nvarchar(100) | IN | New phone number | 
| @NEWADDRESSINFOSOURCE | nvarchar(20) | IN | New address info source | 
| @DECEASEDYEAR | UDT_FUZZYDATE | IN | Year deceased | 
| @DECEASEDYEARDISPLAY | nvarchar(4) | IN | Year deceased | 
| @CONFIDENCELEVEL | smallint | IN | Confidence level | 
| @SENDMAIL | bit | IN | Send mail | 
| @ISDECEASED | bit | IN | Deceased | 
| @NEWSTATEID | uniqueidentifier | IN | 
Definition
 Copy 
                                    
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_BATCHPEOPLEFINDERBATCHROW_2
(
        @ID uniqueidentifier,
        @CHANGEAGENTID uniqueidentifier,
        @SEQUENCE int,
        @PEOPLEFINDERID uniqueidentifier,
        @CONSTITUENTID uniqueidentifier,
        @OLDADDRESSID uniqueidentifier,
        @NEWADDRESSBLOCK nvarchar(150),
        @NEWCITY nvarchar(50),
        @NEWPOSTCODE nvarchar(12),
        @OTHERLASTNAME nvarchar(100),
        @NEWPHONENUMBER nvarchar(100),
        @NEWADDRESSINFOSOURCE nvarchar(20),
        @DECEASEDYEAR dbo.UDT_FUZZYDATE,
    @DECEASEDYEARDISPLAY nvarchar(4),
        @CONFIDENCELEVEL smallint,
        @SENDMAIL bit,
        @ISDECEASED bit,
        @NEWSTATEID uniqueidentifier
        ) 
as
    set nocount on;
    declare @CURRENTDATE datetime;
    if @CHANGEAGENTID is null
        exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;
    set @CURRENTDATE = getdate();
    begin try
        --Don't update any other fields since everything is locked in the UI
        update dbo.BATCHPEOPLEFINDER
        set 
            SEQUENCE = @SEQUENCE,
            CHANGEDBYID = @CHANGEAGENTID,
            DATECHANGED = @CURRENTDATE
        where
            ID = @ID
    end try
    begin catch
        exec.dbo.USP_RAISE_ERROR;
        return 1;
    end catch
    return 0;