30. Januar 2015 13:55
IF ProdOrder.GET(Status,"Prod. Order No.") AND (ProdOrder."Sales Order Line No." <> 0) THEN BEGIN
IF SalesLine.GET(1,ProdOrder."Sales Order No.",ProdOrder."Sales Order Line No.") THEN;
RecRef.GETTABLE(SalesLine);
RecordLink.RESET;
RecordLink.SETRANGE(Company,COMPANYNAME);
RecordLink.SETRANGE("Record ID",RecRef.RECORDID);
IF RecordLink.FINDSET THEN BEGIN
PrintingL := PrintingL.PrintDocument;
REPEAT
FileNameL := FileMgmtL.UploadFileSilent(RecordLink.URL1);
PrintingL.DocumentName(FileNameL);
PrintingL.Print;
UNTIL RecordLink.NEXT = 0;
END;
END;