USP_DESIGNATIONLEVELGIFTFEE_RESET
Executes the "Fundraising Purpose Gift Fee: Restore Defaults" record operation.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | Input parameter indicating the ID of the record being updated. |
@CHANGEAGENTID | uniqueidentifier | IN | Input parameter indicating the ID of the change agent invoking the update. |
Definition
Copy
CREATE procedure dbo.USP_DESIGNATIONLEVELGIFTFEE_RESET(@ID uniqueidentifier, @CHANGEAGENTID uniqueidentifier)
as begin
exec USP_DESIGNATIONLEVELGIFTFEEOPTION_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
exec USP_DESIGNATIONLEVELGIFTFEEOVERRIDE_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID
declare @contextCache varbinary(128);
--cache current context information
set @contextCache = CONTEXT_INFO();
--set CONTEXT_INFO to @CHANGEAGENTID
set CONTEXT_INFO @CHANGEAGENTID;
--remove application types
delete from dbo.DESIGNATIONLEVELGIFTFEEAPPLICATIONTYPE where DESIGNATIONLEVELID = @ID
--remove structure
delete from dbo.DESIGNATIONLEVELGIFTFEESTRUCTURE where DESIGNATIONLEVELID = @ID
--reset CONTEXT_INFO to previous value
if not @contextCache is null
set CONTEXT_INFO @contextCache;
return 0;
end