USP_CONSTITUENTDUPLICATESEARCHPROCESSSTATUS_DELETE

Executes the "Constituent Duplicate Search Process Status: Delete" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being deleted.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the delete.

Definition

Copy


                    CREATE procedure dbo.USP_CONSTITUENTDUPLICATESEARCHPROCESSSTATUS_DELETE
                    (
                        @ID uniqueidentifier,
                        @CHANGEAGENTID uniqueidentifier
                    )
                    as begin
                        set nocount on;

                        if exists (select ID from dbo.BUSINESSPROCESSSTATUS    where ID = @ID and STATUSCODE = 1)
                            raiserror('Business process is still running',13,1);    

                        declare @CURRENTDATE datetime;
                        set @CURRENTDATE = getdate();

                        exec dbo.USP_BUSINESSPROCESSSTATUS_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
                        return 0;
                    end