USP_DESIGNATIONLEVELREVENUEINFORMATION_UNMARKASBENEFACTOR
Executes the "Fundraising Purpose Revenue Information: Unmark As Benefactor" record operation.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | nvarchar(72) | 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_DESIGNATIONLEVELREVENUEINFORMATION_UNMARKASBENEFACTOR (
@ID nvarchar(72)
,@CHANGEAGENTID uniqueidentifier
)
as
begin
set nocount on;
declare @DATECHANGED datetime
set @DATECHANGED = getdate();
declare @CONSTITUENTID uniqueidentifier;
declare @DESIGNATIONLEVELID uniqueidentifier;
set @CONSTITUENTID = cast(left(@ID, 36) as uniqueidentifier);
set @DESIGNATIONLEVELID = cast(right(@ID, 36) as uniqueidentifier);
if @CHANGEAGENTID is null
exec dbo.USP_CHANGEAGENT_GETORCREATECHANGEAGENT @CHANGEAGENTID output;
update dbo.DESIGNATIONLEVELDONORINFORMATION
set ISBENEFACTOR = 0
,CHANGEDBYID = @CHANGEAGENTID
,DATECHANGED = @DATECHANGED
where ISBENEFACTOR = 1
and CONSTITUENTID = @CONSTITUENTID
and DESIGNATIONLEVELID = @DESIGNATIONLEVELID;
return 0;
end