USP_SIMPLEDATALIST_CORRESPONDENCECODE
Returns a list of correspondence codes.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@CORRESPONDENCECODEID | uniqueidentifier | IN |
Definition
Copy
CREATE procedure dbo.USP_SIMPLEDATALIST_CORRESPONDENCECODE
(
@CURRENTAPPUSERID uniqueidentifier,
@CORRESPONDENCECODEID uniqueidentifier = null
)
as
set nocount on;
select
ID as VALUE,
NAME as LABEL
from
dbo.CORRESPONDENCECODE
where
ID = @CORRESPONDENCECODEID or
(
ISACTIVE = 1 and
dbo.UFN_SITEALLOWEDFORUSER(@CURRENTAPPUSERID, SITEID) = 1
)
order by NAME;