CreateProcessNo

Description

A transaction number is required for the assignment of a data record. With this function, either an existing transaction number is drawn or alternatively a new transaction number is created.


Syntax

AL
[ProcessNo:= ] CreateProcessNo(MainRecordVariant: Variant; SubstituteProcessNo: Code[20]; CreateProcessIfNec: Boolean; DoNotBufferProcessNo: Boolean; var NewProcessNoCreated: Boolean; var ProcessNoFound: Boolean)


Parameters

MainRecordVariant

Type: Variant

MainRecord (record) is entered into the ECM queue and is required for processing the metadata.

Tip: The MainRecord can be passed as Record, RecordID or RecordRef.


SubstituteProcessNo

Type: Code

If there is no ECM setup for the process number and as a result no process number can be generated, SubstituteProcessNo is used as a substitute.


[Optional] CreateProcessIfNec

Type: Boolean

If TRUE and the checkbox "Create task" is set in the ECM document definition, an entry is created in the ECM task table.


[Optional] DoNotBufferProcessNo

Type: Boolean

By default, transaction numbers are stored temporarily in a buffer table. With TRUE this storage can be skipped if you are particularly sure.


[Optional] Variable: NewProcessNoCreated

Type: Boolean

Indicates that a new operation number has been created (True)


[Optional] Variable: ProcessNoFound

Type: Boolean

Indicates that an operation number was found



Return Value:

ProcessNo

Typ: Code

Contains the newly created (found) process number.



Remarks:



Example: