USP_DATALIST_MKTMARKETINGPLANTEMPLATES
Displays a list of the available marketing plan templates.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@SECURITYFEATUREID | uniqueidentifier | IN | Input parameter indicating the ID of the feature to use for site security checking. |
@SECURITYFEATURETYPE | tinyint | IN | Input parameter indicating the type of the feature to use for site security checking. |
Definition
Copy
CREATE procedure dbo.[USP_DATALIST_MKTMARKETINGPLANTEMPLATES]
(
@CURRENTAPPUSERID uniqueidentifier = null,
@SECURITYFEATUREID uniqueidentifier = null,
@SECURITYFEATURETYPE tinyint = null
)
as
set nocount on;
select
[ID],
[NAME],
[ISDEFAULT],
dbo.[UFN_MKTMARKETINGPLANTEMPLATE_GETITEMLIST_TOITEMLISTXML]([ID]) as [ITEMLIST],
dbo.[UFN_TRANSLATIONFUNCTION_SITE_GETNAME]([SITEID]) as [SITE],
[ISDEFAULT] as [ISDEFAULTBOOLEAN]
from dbo.[MKTMARKETINGPLANTEMPLATE]
where (dbo.UFN_APPUSER_ISSYSADMIN(@CURRENTAPPUSERID) = 1 or exists (select 1 from dbo.UFN_SITESFORUSERONFEATURE(@CURRENTAPPUSERID,@SECURITYFEATUREID,@SECURITYFEATURETYPE) where SITEID=[MKTMARKETINGPLANTEMPLATE].[SITEID] or (SITEID is null and [MKTMARKETINGPLANTEMPLATE].[SITEID] is null)))
order by [NAME];
return 0;