USP_DATALIST_SPONSORSHIPOPPORTUNITYUNRESERVEPROCESSHISTORY

Returns a status list for the sponsorship opportunity unreserve business process.

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

  declare @BUSINESSPROCESSCATALOGID uniqueidentifier = null

  select @BUSINESSPROCESSCATALOGID = ID from dbo.BUSINESSPROCESSCATALOG where NAME='Sponsorship Opportunity Reserve 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)
  where ProcessName = 'Sponsorship Opportunity Unreserve Business Process'
      order by StartedOn desc