web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Page Designer - C/AL Potential Question

(0) ShareShare
ReportReport
Posted on by 529

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

I have the same question (0)
  • themrmystery Profile Picture
    529 on at
    RE: Page Designer - C/AL Potential Question

    These are not OPEN payments/credit memos. These are payments/credits already applied to a posted invoice, that we'd like to display on the page/report. Basically, when you print a posted invoice, that has an applied-to payment or credit memo, it doesn't show up on the printed report, nor does it show up anywhere on the posted invoice page, to let the nav user know a credit memo or payment was applied to the invoice.

    Thus when a customer asks for a new invoice, it prints for the full value of the posted invoice, and doesn't reflect any payments/credit applied-to it.

    I'm trying to get this information to display in the posted invoices page, and then to print and deduct on the printed invoice.

    Right now, we have to manually add a MISC item line, that states Invoice does not reflect payments/credits. and print a credit memo/payment and send that with the invoice.

  • Community Member Profile Picture
    on at
    RE: Page Designer - C/AL Potential Question

    If will effect future postings.  In fact even if you wanted to do an "apply to type" & "#".  Why would you put it on the posted end and not on the original unposted order?

  • Community Member Profile Picture
    on at
    RE: Page Designer - C/AL Potential Question

    I have never heard of someone messing with the posted sales invoice's to apply entries before.

    If you want OPEN paments and/or Credit memos to be applied automatically to new invoices, then just go to the customer card & set the "Application Method" to "Apply to Oldest".

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans