I'm customizing Page 132 - Posted Sales Invoice
I've added the following fields, "Applies-to Doc. Type" and "Applies-to Doc. No." I then added a C/AL Global variable, "LedgerAmt"
I then setup LedgerAmt to pull from the "Cust. Ledger Entry".Amount WHERE (Document No.=FIELD(Applies-to Doc. No.),Document Type=FIELD(Applies-to Doc. Type),Customer No.=FIELD(Sell-to Customer No.))
I was hoping this would pull the amount of the Entry (i.e., if there is a Credit Memo applied or a Payment applied).
This sort of works, the LedgerAmt field in NAV 2013, gives me a drop down, and allows me to SELECT the corresponding Entry Line, and then fills in the field... I would however like this to happen automatically. There should only ever be one corresponding Document Type + Document No + Cust. No, so what do I need to do to make the field auto-populate with the only Entry that shows up according to the above filter?
Thanks!
*This post is locked for comments