Table of Contents

AddMetadata Procedure

Codeunit Output Queue Metadata

Adds a metadata key-value pair to the current output queue data entry being created.

Call this method during export operations to attach custom metadata. The metadata will be stored in the QWEEG Queue Metadata table linked to the Output Queue Data Entry or Queue Data Entry.

Signature

AddMetadata(Code: Text[100]; Value: Variant)

Parameters

Code Text[100]

The metadata field code/key (alphanumeric characters only). Used for identification and file name placeholders.

Value Variant

The metadata value of any data type. Values are stored as text for all types; Date and DateTime values are rehydrated during use. The text value will be truncated if longer than 250 characters.

Remarks

Must be called in the context of an active output queue export operation (after each call to FileManagement.BLOBExport() or "QWETB Temp Blob".ExportToClientFile()). The Code value is automatically sanitized to contain only alphanumeric characters.

Example

Adding metadata during file export:

TempBlob.FromRecord(IncomingDocumentAttachment, IncomingDocumentAttachment.FieldNo(Content));
FileManagement.BLOBExport(TempBlob, FileName, false);
OutputQueueMetadata.AddMetadata('OriginalFileName', IncomingDocumentAttachment.GetFullName());
OutputQueueMetadata.AddMetadata('AttachmentType', 'Incoming Document Attachment');
OutputQueueMetadata.AddMetadata('CreatedAt', IncomingDocumentAttachment.SystemCreatedAt);

This documentation is generated from Eagle v27.6