USP_SIMPLEDATALIST_EVENTMANAGEMENTTEMPLATE

Returns a list of all the event management templates to which a user has access.

Parameters

Parameter Parameter Type Mode Description
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.

Definition

Copy


CREATE procedure dbo.USP_SIMPLEDATALIST_EVENTMANAGEMENTTEMPLATE
(
    @CURRENTAPPUSERID uniqueidentifier = null
)as
    select distinct
        TEMPLATE.ID as [VALUE], 
        TEMPLATE.NAME as [LABEL]
    from 
        dbo.EVENTMANAGEMENTTEMPLATE TEMPLATE
    left outer join
        dbo.EVENTMANAGEMENTTEMPLATESITE TEMPLATESITE on TEMPLATESITE.EVENTMANAGEMENTTEMPLATEID = TEMPLATE.ID
    where
        (dbo.UFN_SITEALLOWEDFORUSER(@CURRENTAPPUSERID, SITEID) = 1 or SITEID is null)
    and
        ISSYSTEMTEMPLATE = 0
    order by 
        TEMPLATE.NAME asc