USP_INTERACTIONSUBCATEGORY_DELETE
Executes the "Interaction Subcategory: Delete" record operation.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | 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_INTERACTIONSUBCATEGORY_DELETE
(
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier
)
as
set nocount on;
declare @CURRENTDATE datetime = getdate();
if exists(select object_id from sys.objects where type = 'U' and name = 'BATCHINTERACTION')
update
dbo.BATCHINTERACTION
set
INTERACTIONSUBCATEGORYID = null,
CHANGEDBYID = @CHANGEAGENTID,
DATECHANGED = @CURRENTDATE
where
INTERACTIONSUBCATEGORYID = @ID;
exec dbo.USP_INTERACTIONSUBCATEGORY_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID;
return 0;