USP_DATAFORMTEMPLATE_EDITLOAD_BATCHCOMMITPARAMETERS3

The load procedure used by the edit dataform template "Batch Commit Process Parameter Edit Form 3"

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@BATCHNUMBER nvarchar(100) INOUT Batch number
@CREATEOUTPUTIDSET bit INOUT Create output Selection
@OUTPUTIDSETNAME nvarchar(100) INOUT Selection name
@OVERWRITEOUTPUTIDSET bit INOUT Overwrite existing Selection
@CREATEEXCEPTIONBATCH bit INOUT Create exception batch
@EXCEPTIONBATCHNAME nvarchar(60) INOUT Exception batch name
@PURGEBATCH bit INOUT Delete batch after committing
@CREATECONTROLREPORT bit INOUT Create control report
@VALIDATEBATCH bit INOUT Validate batch before committing
@CHECKFORDUPLICATERECORDS bit INOUT Check for duplicate constituents
@BATCHSUPPORTSCHECKINGFORDUPLICATERECORDS bit INOUT Batch supports checking for duplicate records
@TSLONG bigint INOUT Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record.

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_BATCHCOMMITPARAMETERS3
    (
        @ID uniqueidentifier,
        @DATALOADED bit = 0 output,
        @BATCHNUMBER nvarchar(100) = null output,
        @CREATEOUTPUTIDSET bit = null output,
        @OUTPUTIDSETNAME nvarchar(100) = null output,
        @OVERWRITEOUTPUTIDSET bit = null output,
        @CREATEEXCEPTIONBATCH bit = null output,
        @EXCEPTIONBATCHNAME nvarchar(60) = null output,
        @PURGEBATCH bit = null output,
        @CREATECONTROLREPORT bit = null output,
        @VALIDATEBATCH bit = null output,
        @CHECKFORDUPLICATERECORDS bit = null output,
        @BATCHSUPPORTSCHECKINGFORDUPLICATERECORDS bit = null output,
        @TSLONG bigint = 0 output
    )
as                
    set NOCOUNT on;

    set @DATALOADED = 0
    set @TSLONG = 0

    select    
        @DATALOADED = 1,
        @BATCHNUMBER = [BATCH].[BATCHNUMBER],
        @CREATEOUTPUTIDSET = [BATCH].[CREATEOUTPUTIDSET],                        
        @OUTPUTIDSETNAME = [BATCH].[OUTPUTIDSETNAME],
        @OVERWRITEOUTPUTIDSET = [BATCH].[OVERWRITEOUTPUTIDSET],
        @CREATEEXCEPTIONBATCH =[BATCH].[CREATEEXCEPTIONBATCH],
        @EXCEPTIONBATCHNAME = [BATCH].[EXCEPTIONBATCHNAME],
        @PURGEBATCH = [BATCH].[PURGEBATCH],
        @CREATECONTROLREPORT = [BATCH].[CREATECONTROLREPORT],
        @VALIDATEBATCH = [BATCH].[VALIDATEBATCH],
        @CHECKFORDUPLICATERECORDS = [BATCH].[CHECKFORDUPLICATERECORDS],
        @BATCHSUPPORTSCHECKINGFORDUPLICATERECORDS = case when dbo.UFN_GLOBALDUPLICATESEARCH_ISENABLED() = 1 and SPECXML.exist('declare namespace bbspec="bb_appfx_batchtype";
            /bbspec:BatchTypeSpec/bbspec:DuplicateRecordCheck
        ') = 1 then 1 else 0 end,
        @TSLONG = [BATCH].[TSLONG]
    from
        dbo.[BATCH]
    inner join dbo.BATCHTEMPLATE on BATCHTEMPLATE.ID = BATCH.BATCHTEMPLATEID
    inner join dbo.BATCHTYPECATALOG on BATCHTYPECATALOG.ID = BATCHTEMPLATE.BATCHTYPECATALOGID
    where
        [BATCH].[ID] = @ID;                    

    return 0;