USP_BATCHAUCTIONITEMBATCHSYSTEMMESSAGES_DELETEBYROWID

Parameters

Parameter Parameter Type Mode Description
@ROWID uniqueidentifier IN
@CHANGEAGENTID uniqueidentifier IN
@DELETESAVE bit IN
@DELETEVALIDATION bit IN
@DELETEIMPORT bit IN

Definition

Copy
/*
Generated by Blackbaud AppFx Platform
Date:  9/1/2024 11:53:52 PM
Assembly Version:  Blackbaud.AppFx.Platform.SqlClr, Version=4.0.3800.0, Culture=neutral, PublicKeyToken=null
Copyright Blackbaud
*/
CREATE PROCEDURE dbo.USP_BATCHAUCTIONITEMBATCHSYSTEMMESSAGES_DELETEBYROWID
(
@ROWID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier,
@DELETESAVE bit = 1,
@DELETEVALIDATION bit = 1,
@DELETEIMPORT bit = 1
)

as

set nocount on;    

    declare @contextCache varbinary(128);

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

    set @contextCache = CONTEXT_INFO();

    set CONTEXT_INFO @CHANGEAGENTID;

    delete from dbo.BATCHAUCTIONITEMBATCHSYSTEMMESSAGES 
    where BATCHAUCTIONITEMID = @ROWID
    and (@DELETESAVE = 1 or not ORIGINCODE = 1)
    and (@DELETEVALIDATION = 1 or not ORIGINCODE = 2)
    and (@DELETEIMPORT = 1 or not ORIGINCODE = 3);

    if not @contextCache is null
        set CONTEXT_INFO @contextCache;

    return 0;