USP_DATAFORMTEMPLATE_EDITLOAD_BATCH2WORKFLOWSTATE
The load procedure used by the edit dataform template "Batch Workflow Status Edit Form"
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. |
@NAME | nvarchar(200) | INOUT | Name |
@ALLOWCOMMIT | bit | INOUT | Allow batch to be committed when in this status |
@ISINITIALSTATE | bit | INOUT | This is the initial status for the workflow |
@ALLOWEDIT | bit | INOUT | Allow batch to be edited in this status |
@OVERDUEIN | tinyint | INOUT | Days allowed before batch is overdue |
@ENFORCETOTALMATCHING | bit | INOUT | Only allow commit when projected totals match batch totals |
@PERMISSIONS | xml | INOUT | Specify roles that have access to batches in this status |
@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_BATCH2WORKFLOWSTATE(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@NAME nvarchar(200) = null output,
@ALLOWCOMMIT bit = null output,
@ISINITIALSTATE bit = null output,
@ALLOWEDIT bit = null output,
@OVERDUEIN tinyint = null output,
@ENFORCETOTALMATCHING bit = null output,
@PERMISSIONS xml = null output,
@TSLONG bigint = 0 output
)
as
set nocount on;
set @DATALOADED = 0
set @TSLONG = 0
select
@DATALOADED = 1,
@NAME = NAME,
@ALLOWCOMMIT=ALLOWCOMMIT,
@ISINITIALSTATE=ISINITIALSTATE,
@ALLOWEDIT = ALLOWEDIT,
@OVERDUEIN = coalesce(OVERDUEIN,0),
@ENFORCETOTALMATCHING = ENFORCETOTALMATCHING,
@PERMISSIONS = dbo.UFN_BATCHWORKFLOWSTATE_GETSYSTEMROLEPERMISSIONS_TOITEMLISTXML(@ID),
@TSLONG = TSLONG
from dbo.BATCHWORKFLOWSTATE
where ID = @ID;
return 0;