Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Serializing the Apply Entries in CustomerLedgerEntries

Posted on by 3,957

Hi,
I've a requirement where I've to apply entries from Customer Ledger Entries using code.  We've added a functionality where we can select the invoices and create a payment plan. And while applying Invoices having payment plans with payments, I want to reduce the amount in Payment Plans. But the issue I'm facing is when i call the following code,
CODEUNIT.RUN(CODEUNIT::"Cust. Entry-Edit",CustLedgerEntryPayment);
CustEntrySetApplID.SetApplId(CustLedgerEntryInvoice,CustLedgerEntryInvoice,'');

CustEntryApplyPostedEntries.Apply(CustLedgerEntryPayment,(CustLedgerEntryInvoice."Document No."),PostingDate);

Serializing of the Payment with Invoice and its Payment Plan is not possible as the standard applying entries codeunit are applying multiple payments and invoices and I cannot reduce the remaining amount in payment plans.
 As far as this requirement goes, I can see two options
1. Create my own code for applying the Customer Ledger Entries.
2. Modify the existing code.

Either ways I want to understand in detail how applying entries work. Kindly suggest.

Thanks.

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans