Table of Content
HAL Forum
function Boolean ReadRecordLink (
record AnyTargetRec,integer cnt,var record AnyLinkedRec,var record RecLinkr)
Description:
Reads a specified type of record link from the record of interest
Parameters:
AnyTargetRec The record from which to find the link
cnt Determines which record recordlink to read (starts from 1).
AnyLinkedRec Linked register (can be any record
RecLinkr The record that contains more data about the link (RLinkVc)
function Boolean CheckAttachedFilesSize(record LetVc Letp)
BEGIN
  Boolean res;
  record EmailBlock EmailRec;
  record RLinkVc RLr;
  record Attach2Vc Attach2r;
  Integer filenr;
    
  res = true;
  BlockLoad(EmailRec);
  if (EmailRec.MaxFileSize<=0) then begin
    goto LCheckAttachedFilesSize;
  end;
  filenr = 1;
  while (ReadRecordLink(Letp,filenr,Attach2r,RLr)) begin
    if ((nonblank(Attach2r.FileName)) and (Attach2r.Uploading==0)) then begin
      if (Attach2r.FileSize>EmailRec.MaxFileSize) then begin
        res = false;
        goto LCheckAttachedFilesSize;
      end;
    end;
    filenr = filenr + 1;
  end;
LCheckAttachedFilesSize:;  
  CheckAttachedFilesSize = res;
  RETURN;
END;
Related topics:
««