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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156