fnEmailTemplateNameIsOK
Return
| Return Type |
|---|
| bit |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @ContextIDExcluded | int | IN | |
| @RequestedName | nvarchar(100) | IN | |
| @ClientSitesID | int | IN |
Definition
Copy
CREATE FUNCTION [dbo].[fnEmailTemplateNameIsOK]
(
@ContextIDExcluded int,
@RequestedName nvarchar(100),
@ClientSitesID int
)
RETURNS bit
AS
BEGIN
DECLARE @NameIsOK bit
SET @NameIsOK=1
IF EXISTS (
SELECT TOP 1 [ID]
FROM [EmailTemplate]
WHERE [ID] <> @ContextIDExcluded AND [Name]=@RequestedName and [ClientSitesID] = @ClientSitesID)
SET @NameIsOK=0
RETURN @NameIsOK
END