USP_DATALIST_SPONSORSHIPTRANSFERPROCESSHISTORY

Retrieves a list of the history for a given sponsorship transfer BP

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_SPONSORSHIPTRANSFERPROCESSHISTORY(@CONTEXTID uniqueidentifier)
as
    set nocount on;

  declare @BUSINESSPROCESSCATALOGID uniqueidentifier = null

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

  select ID,
      ProcessName,
      Status,
      StatusMessage,
      StartedBy,
      StartedOn,
      EndedOn,
      Duration,
      NumberOfRecordsProcessed,
      NumberOfExceptionRecords,
      TotalCount,
      ServerName,
      ImageKey,
      Completed,
      EnableDownload,
      EnableLetterMailMerge,
            EnableLabelMailMerge,
      EnableMultipleLetterMailMerge,
      TotalCount Total,
      case when NumberOfRecordsProcessed > 0 then 1 else 0 end PROCESSREPORT,
        case when NumberOfExceptionRecords > 0 then 1 else 0 end ERRORREPORT
  from dbo.UFN_BUSINESSPROCESSSTATUS_STANDARDDATALISTVALUES(@BUSINESSPROCESSCATALOGID, @CONTEXTID, -1)
      order by StartedOn desc