USP_SYSTEMROLE_DELETE
Executes the "System Role: 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_SYSTEMROLE_DELETE
(
@ID uniqueidentifier,
@CHANGEAGENTID uniqueidentifier
)
as
set nocount on;
if exists (select top 1 1 from SYSTEMROLE where ISSYSTEM = 1 and ID = @ID)
RAISERROR ('ERR_SYSTEMROLE_ISSYSTEM', 16, 1);
delete from dbo.SITEPERMISSION where SITEPERMISSION.SYSTEMROLEID = @ID;
exec dbo.USP_SYSTEMROLE_DELETEBYID_WITHCHANGEAGENTID @ID, @CHANGEAGENTID;
exec dbo.USP_SITEPERMISSION_UPDATEPERMISSIONS
return 0;