USP_DATAFORMTEMPLATE_EDIT_REVENUEBATCHCONSTITUENTSECURITY

The save procedure used by the edit dataform template "Revenue Batch Constituent Security Edit Data Form".

Parameters

Parameter Parameter Type Mode Description
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the procedure.
@CONSTITUENTSECURITY bit IN Enable constituent site security checks in revenue batches

Definition

Copy


          CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_REVENUEBATCHCONSTITUENTSECURITY (
              @CHANGEAGENTID uniqueidentifier = null,
              @CONSTITUENTSECURITY bit
          )
          as

              set nocount on;

              if @CHANGEAGENTID is null  
                  exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output

              declare @CURRENTDATE datetime
              set @CURRENTDATE = getdate()

              begin try
                  update dbo.REVENUEBATCHCONSTITUENTSECURITY set
                      CONSTITUENTSECURITY = @CONSTITUENTSECURITY,
                      CHANGEDBYID = @CHANGEAGENTID,
                      DATECHANGED = @CURRENTDATE
              end try
              begin catch
                  exec dbo.USP_RAISE_ERROR
                  return 1
              end catch

          return 0;