USP_RECORDOPERATION_WEALTHCAPACITY_UNCONFIRM

Executes the "Wealth Capacity: Unconfirm" record operation.

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN Input parameter indicating the ID of the record being updated.
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the update.

Definition

Copy


                        create procedure dbo.USP_RECORDOPERATION_WEALTHCAPACITY_UNCONFIRM (
                        @ID uniqueidentifier,
                        @CURRENTAPPUSERID uniqueidentifier,
                        @CHANGEAGENTID uniqueidentifier = null
                    ) as begin
                        if @CHANGEAGENTID is null  
                            exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output

                        declare @CURRENTDATE datetime
                        set @CURRENTDATE = getdate()

                        update dbo.[WEALTHCAPACITY] set 
                            [CONFIRMED] = 0,
                            [DATECHANGED] = @CURRENTDATE,
                            [CHANGEDBYID] = @CHANGEAGENTID
                        where
                            WEALTHCAPACITY.[ID] = @ID and 
                            WEALTHCAPACITY.[CONFIRMED] = 1

                        return 0;
                    end