|
Returns the RecordIdString for the specified record. |
|
TargetRecord |
The record that we want the recordIdString for. |
|
global
updating procedure TestAndDeleteMail(record MailVc Mailr)
begin
LongInt i,rwcnt;
row MailVc Mailrw;
record RLinkVc RLr;
string 255 rlink;
rlink = GetRecordLink(Mailr);
RLr.ToRecidStr = rlink;
if (ReadFirstKey("ToRecKey",RLr,1,true)) then begin
if (RLr.ToRecidStr==rlink) then begin
goto out;
end;
end;
rwcnt = MatRowCnt(Mailr);
for (i = 0; i<rwcnt; i = i + 1) begin
MatRowGet(Mailr,i,Mailrw);
if (Mailrw.Mailbox<>-1 and Mailrw.AddrStatus==0) then begin
goto out;
end;
end;
RecordDelete(Mailr);
DeleteAllMailRead(Mailr.SerNr);
//DeleteAllMailAttach(Mailr.SerNr);
out:;
return;
end;
««