Codeunit: 226 in Dynamics-NAV 4.00
Dr_mjh
Member Posts: 203
Hi there,
We have a case in Dynamics-NAV 4.00 in which we have an invoice with two payments the payment has been applied to the invoice. Those payments have appeared to be wrong so when we wanted to unapply the payments this message appears:
(Before you can apply this entry, you must first unapply all application entries in Cust. Ledger Entries no.: 56 that were posted after this entry)
We checked by the debugger and we found this code in the code unit no. 266:
"IF (ApplicationEntryNo <> 0) AND (ApplicationEntryNo <> DtldCustLedgEntry."Entry No.") THEN
ERROR(Text012,CustLedgEntry.TABLECAPTION,DtldCustLedgEntry."Cust. Ledger Entry No.");"
It appears that the system checks if there is any application entry no. exists and if it does the error message pops out. It does make sense that there is an application entry no. because the invoice has been applied to two individual independent payments. So what is the point of this code? Anyway if we deleted this code the payments can be smoothly unapplied without any problems. I suspect that this code is a bug. I don't know if anyone would agree with me.
Any help my friends will be greatly appreciated.
Thank you for your cooperation.
Best Regards
We have a case in Dynamics-NAV 4.00 in which we have an invoice with two payments the payment has been applied to the invoice. Those payments have appeared to be wrong so when we wanted to unapply the payments this message appears:
(Before you can apply this entry, you must first unapply all application entries in Cust. Ledger Entries no.: 56 that were posted after this entry)
We checked by the debugger and we found this code in the code unit no. 266:
"IF (ApplicationEntryNo <> 0) AND (ApplicationEntryNo <> DtldCustLedgEntry."Entry No.") THEN
ERROR(Text012,CustLedgEntry.TABLECAPTION,DtldCustLedgEntry."Cust. Ledger Entry No.");"
It appears that the system checks if there is any application entry no. exists and if it does the error message pops out. It does make sense that there is an application entry no. because the invoice has been applied to two individual independent payments. So what is the point of this code? Anyway if we deleted this code the payments can be smoothly unapplied without any problems. I suspect that this code is a bug. I don't know if anyone would agree with me.
Any help my friends will be greatly appreciated.
Thank you for your cooperation.
Best Regards
0
Comments
-
try selecting the invoice the payments were applied to from the CLE. Then "unapply entries." you should then see a screen asking which entries to unapply. i just did it and it worked for me.Dr mjh wrote:Hi there,
We have a case in Dynamics-NAV 4.00 in which we have an invoice with two payments the payment has been applied to the invoice. Those payments have appeared to be wrong so when we wanted to unapply the payments this message appears:
(Before you can apply this entry, you must first unapply all application entries in Cust. Ledger Entries no.: 56 that were posted after this entry)
We checked by the debugger and we found this code in the code unit no. 266:
"IF (ApplicationEntryNo <> 0) AND (ApplicationEntryNo <> DtldCustLedgEntry."Entry No.") THEN
ERROR(Text012,CustLedgEntry.TABLECAPTION,DtldCustLedgEntry."Cust. Ledger Entry No.");"
It appears that the system checks if there is any application entry no. exists and if it does the error message pops out. It does make sense that there is an application entry no. because the invoice has been applied to two individual independent payments. So what is the point of this code? Anyway if we deleted this code the payments can be smoothly unapplied without any problems. I suspect that this code is a bug. I don't know if anyone would agree with me.
Any help my friends will be greatly appreciated.
Thank you for your cooperation.
Best Regards
if i tried by selecting the payment and clicking unapply, i got the error you have. tells me that the order in which you do it is important. good luck!kind of fell into this...0 -
Thank you jversusj for your reply.
I've just done what you suggested on me but I had the same error message.
Besides it is not a business logic in what so ever way for the order which I do it is important -It was not written even in the manuals- and how about the code? Is it logic to check if I unapply the invoice or the payment? and for what purpose i.e.: what difference does it make?
Thank you for your cooperation.
Best Regards0 -
FYI: There is a bug on the apply/unapply that prevents Nav in posting a zero amount G/L Entry to get a new Transaction No. and so mark the detailed entries with that transaction no. so that you can unapply the correct entries, correctly.
In order to see if you have that kind of error, check the transaction code of the detailed ledger entry you want to unapply if there is a corresponding (zero amount) G/L Entry with the same Transaction No.
If there is no G/L Entry then you have the bug, and it will make you run in a loop by trying to unapply one and the other stops you and "vise versa"...
In case you have that bug then you should make a post an mbs incident to get your local corrections...0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 322 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions

