USP_DATALIST_SPONSORSHIPLOCATIONCLOSEPROCESSHISTORY

Retrieves a list of the history for a given location

Parameters

Parameter Parameter Type Mode Description
@CONTEXTID uniqueidentifier IN Input parameter indicating the context ID for the data list.

Definition

Copy


create procedure dbo.USP_DATALIST_SPONSORSHIPLOCATIONCLOSEPROCESSHISTORY(@CONTEXTID uniqueidentifier)
as
    set nocount on;

  declare @BUSINESSPROCESSCATALOGID uniqueidentifier = null

  select @BUSINESSPROCESSCATALOGID = ID from dbo.BUSINESSPROCESSCATALOG where NAME='Close Sponsorship Location Business Process'

  select ID,
      ProcessName,
      Status,
      StatusMessage,
      StartedBy,
      StartedOn,
      EndedOn,
      Duration,
      NumberOfRecordsProcessed,
      NumberOfExceptionRecords,
      TotalCount,
      ServerName,
      ImageKey,
      Completed,
      EnableDownload,
      EnableLetterMailMerge,
            EnableLabelMailMerge,
      EnableMultipleLetterMailMerge,
      case when NumberOfRecordsProcessed > 0 then 1 else 0 end PROCESSREPORT,
      case when NumberOfExceptionRecords > 0 then 1 else 0 end ERRORREPORT
     -- coalesce(dbo.UFN_SPONSORSHIPLOCATION_GETFULLNAME(cast(ParameterSetName AS uniqueidentifier)),'')

  from dbo.UFN_BUSINESSPROCESSSTATUS_STANDARDDATALISTVALUES(@BUSINESSPROCESSCATALOGID, @CONTEXTID, -1)
      order by StartedOn desc