Skip to main content

Notifications

Announcements

No record found.

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

  • themrmystery Profile Picture
    themrmystery 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.

  • 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?

  • 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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,575 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans