Vendor Ledger Entry - OnAfterGetRecord()
I want to print the Purchase Order No. which is saved in purchase receipt header.
My code is below.
PurchInvLine.RESET;
PurchInvLine.SETRANGE("Document No.",PurchInvHeader."No.");
PurchInvLine.SETRANGE("Receipt Document No.",PurchRcptHeader."No.");
IF PurchInvLine.FIND('-') THEN BEGIN
PurchRcptHeader.RESET;
PurchRcptHeader.SETRANGE("Order No.", PurchInvHeader."Order No.");
IF PurchRcptHeader.FIND('-') THEN BEGIN
PONo:= PurchRcptHeader."Order No.";
END;
END;
My code is not working to get the PO No. information.
Here have three table,
Purch. Inv. Header
Purch. Rcpt. Header
Purch. Inv. Line
Receipt Document No. is a MRN no from "Purch. Rcpt. Header". ORDER No. is field in "Purch. Rcpt. Header" table, which have PO No.
*This post is locked for comments
I have the same question (0)