Archiving files
Depending on the setup, Freeze archives automatically in various situations (for example after posting sales or purchase documents). The following describes which procedures a developer can call to initiate the archiving of a folder including its file attachments.
Let us assume you want to archive a new archive folder with one or more file(s).
First, add the values that correspond to your files to the temporary record of type "DXP FRZ Attachment Buffer".
To keep this simple, we recommend using the following procedure:
codeunit 70954897 "DXP FRZ Attachment Mgt.":
procedure AddFileFromStream(var TempFRZAttachmentBuffer: Record "DXP FRZ Attachment Buffer" temporary, var InStr: InStream, FileName: Text)
Next, call the following procedure to create an entry in the Freeze processing queue that contains the folder details and attachments used to create the archive entry.
codeunit 70954899 "DXP Freeze Queue Buffer Mgt.":
procedure InsertQueueBufferEntry(RecSystemID: Guid, RecTableNo: Integer, var FRZAttachmentBufferTemp: Record "DXP FRZ Attachment Buffer" temporary, ArchiveRecordID: Guid, FrzRecordType: Text[35], ReferenceDate: Date, RecordTitle: Text[250]): Boolean
The procedures are overloaded - choose the variant that matches your scenario.
If you want to implement your own logic to initiate archiving after posting a sales or purchase document, disable automatic archiving in the Freeze Setup to avoid unwanted redundancies.
No comments to display
No comments to display