USP_GIVINGLEVELPROGRAM_VALIDATESMARTFIELDDELETE
Validates that the smart field is not in use by a giving level program.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@SMARTFIELDID | uniqueidentifier | IN |
Definition
Copy
create procedure dbo.USP_GIVINGLEVELPROGRAM_VALIDATESMARTFIELDDELETE
(
@SMARTFIELDID uniqueidentifier
)
with execute as caller
as
if @SMARTFIELDID is not null begin
if exists (select *
from dbo.GIVINGLEVELPROGRAM
where GIVINGLEVELPROGRAM.SMARTFIELDID = @SMARTFIELDID)
begin
raiserror('The smart field cannot be deleted because it is being used by one or more Giving Level Programs.',13,1)
end
end