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
My data item is "Vendor Ledger Entry" that's a reason i am facing the problem to find the PO no from PurchRcptHeader .
Through my code:
Vendor Ledger Entry - OnAfterGetRecord()
I have find the many values, but unable to find the PO no. from PurchRcptHeader.
recVend.RESET;
recVend.SETRANGE("No.","Vendor Ledger Entry"."Vendor No.");
IF recVend.FIND('-') THEN BEGIN
txtvendname := recVend.Name;
END;
PurchInvHeader.RESET;
PurchInvHeader.SETRANGE("No.","Vendor Ledger Entry"."Document No.");
IF PurchInvHeader.FIND('-') THEN BEGIN
txtPONo := PurchInvHeader."Order No.";
txtPayTerms:=PurchInvHeader."Payment Terms Code";
END;
PurchInvLine.SETRANGE("Receipt Document No.",PurchRcptHeader."No.");
you are getting PurchRcptHeader below and does this field has values here?
Sohail Ahmed
2
mmv
2
Amol Salvi
2