Table of Content
HAL Forum
procedure CreateRecordLink (
Record destinationrecord,Integer destinationcompany,Record sourcerecord,Integer sourcecompany)
Description:
Attaches one record to another. It is used in window's "paper-clip".
Parameters:
destinationrecord destination - to which record to attach
destinationcompany internal company number of destination record
sourcerecord source - what to attach
sourcecompany internal company number of source record
updating procedure MakeActFromVIVc(record VIVc VIp,var record ActVc Actp)
BEGIN
  record CUVc VEr;
  Integer curcomp;

  if (ReadFirstMain(VIp,0,true)) then begin end;  
  if (VIp.Invalid==0) then begin
    curcomp = CurrentCompany;
    Actp.SerNr = -1;
    Actp.Invalid = 0;
    Actp.TodoFlag = 1;
    Actp.CUCode = VIp.VECode;
    Actp.CUName = VIp.VEName
    Actp.Comment = VIp.Comment;
    Actp.TransDate = VIp.DueDate;
    Actp.MainPersons = CurrentUser;
    Actp.PrioLevel = -1;
    Actp.SerNr = NextSerNr("ActVc",Actp.TransDate,-1,false,"");
    if (RecordStore(Actp,false)) then begin 
      CreateRecordLink(Actp,curcomp,VIp,curcomp);  
    end;
  end;  
  RETURN;
END;
Related topics:
««