USP_DATALIST_ACTIONITEMRECENT

Action Item Recent Data List.

Parameters

Parameter Parameter Type Mode Description
@CONSTITUENTID uniqueidentifier IN Input parameter indicating the context ID for the data list.
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.
@MAXROWS int IN Input parameter indicating the maximum number of rows to return.
@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_ACTIONITEMRECENT
        (
                    @CONSTITUENTID uniqueidentifier,
                    @CURRENTAPPUSERID uniqueidentifier = null,
                    @MAXROWS int = 50,
                    @SECURITYFEATUREID uniqueidentifier = null,
                    @SECURITYFEATURETYPE tinyint = null
                )
        as
            set nocount on;

          SET ROWCOUNT @MAXROWS

            SELECT  distinct  ID = AA.ID,
            [DATE] = Convert(varchar, AA.DATEADDED, 101),
            [TYPE] = AI.Type,
            ACTIONITEMNAME = AI.NAME
          From dbo. ADVOCACYACTIVITY (Nolock) AA
             INNER JOIN dbo.ACTION_ITEM (nolock) AI On AA.ACTIONITEMID = AI.ID
          WHERE AA.CONSTITUENTID = @CONSTITUENTID
          ORDER BY [DATE] desc

          SET ROWCOUNT 0