UFN_CMSEMAILTEMPLATES_WITH_SAMPLES

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@CLIENTSITESID int IN

Definition

Copy


create function dbo.UFN_CMSEMAILTEMPLATES_WITH_SAMPLES
(
  @CLIENTSITESID int
)
returns table
as
return
(
  select ET_S.ID, ET_S.ClientsId, ET_S.Name, ET_S.Description, ET_S.OwnerID, ET_S.Guid, ET_S.FromAddress, ET_S.FromDisplayName, ET_S.Subject, ET_S.Priority, ET_S.ReplyAddress, ET_S.ReturnReceipt, ET_S.ReturnReceiptAddress, ET_S.ForwardDSN, ET_S.ForwardDSNAddress, ET_S.Type, ET_S.IsInternalUse, ET_S.DataSourceID, ET_S.IsSample, ET_S.Deleted, @CLIENTSITESID As ClientSitesId 
  from dbo.EmailTemplate ET_S where IsSample = 1
  union all
  select ET.ID, ET.ClientsId, ET.Name, ET.Description, ET.OwnerID, ET.Guid, ET.FromAddress, ET.FromDisplayName, ET.Subject, ET.Priority, ET.ReplyAddress, ET.ReturnReceipt, ET.ReturnReceiptAddress, ET.ForwardDSN, ET.ForwardDSNAddress, ET.Type, ET.IsInternalUse, ET.DataSourceID, ET.IsSample, ET.Deleted, ET.ClientSitesId 
  from dbo.EmailTemplate ET where IsSample = 0 and ClientSitesId = @CLIENTSITESID
)