AssignFileDialog

Description

Core functionality for storing a file. After the user has selected the file, it is entered into the ECM queue.


Syntax

AL
[ErrorCode:= ] AssignFileDialog(var TempECMJnlLine: Record "ECM Document Journal Line"; var TempMetadataFieldValue: Record "ECM Metadata Field Value"; var ECMDocDef: Record "ECM Document Definition"; MainRecordVariant: Variant; ShowMessage: Boolean; var TransactionNo: BigInteger)


Parameters

Variable: TempECMJnlLine

Type: Record "ECM Document Journal Line" temporary

Used as a data object ("container") to pass data to a function, for all fields that need to be filled in the document items. By default, the document entries are filled using the MainRecord and the document definition.

Filename, BLOB and MD5 hash are mandatory fields


Variable: TempMetadataFieldValue

Type: Record "ECM Metadata Field Value" temporary

Used as a data object ("container") to pass values with this record. By default, the "Value" field in the table is read.


Variable: ECMDocDef

Type: Record "ECM Document Definition"

ECM document definition for the record. The correct document definition for the record is searched with the API function FindDocDefByRRef


MainRecordVariant

Type: Variant

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

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


[Optional] ShowMessage

Type: Boolean

Set this parameter to TRUE if you want to display a message.


Variable: TransactionNo

Type: BigInteger

ECM queue transaction no. that is returned.

With the transaction number and the ReleaseECMRepositoryRequest function the ECM queue entry is released for further processing.


Return Value:

ErrorCode

Type Integer

ErrorCode = 0 if the operation was successful.



Remarks:



Example: