Table of Content
HAL Forum
procedure AddAttachFileToArea (
record Attach2Vc Attachr,var area TargetArea,boolean Encode)
Description:
Inserts the contents of a specified attachment into an area
Parameters:
Attachr Attachment record (that has been, for example, retrieved with ReadRecordLink)
TargetArea The area that will receive the attachment data
Encode Determines if the added file will be encoded when added
// Will dump all the attachments for all the items
global
updating procedure DumpItemsAttachments()
begin
  Record INVc INr;
  record Attach2Vc Attachr;
  record RLinkVc RLinkr;
  Integer i;
  area a;

  while(LoopMain(INr,1,true)) begin
    for(i=1;ReadRecordLink(INr,i,Attachr,RLinkr);i=i+1) begin
      if (Attachr.Uploading==0) then begin
        SetAreaZeroSize(a);
        AddAttachFileToArea(Attachr,a,false);
        LogAreaToFile(INr.Code & "_" & Attachr.FileName,a);
      end;
    end;  
  end;
  return;
end;
Related topics:
««