[Bug] Table 11307 "G/L Entry Application Buffer", procedure "Apply"
Hi, we have a custom functionality to apply General Ledger Entries in bulk. The final posting is handled via procedures in page 11310 "General Ledger Entries Apply" (in our old NAV version page 11309) and procedure "Apply" in table 11307 "G/L Entry Application Buffer".
Probably due to the fact that Page "Apply General Ledger Entries" (11309) is (going to be) replaced by "General Ledger Entries Apply" (11310), procedure "Apply" was moved from page 11309 to table "G/L Entry Application Buffer" (11307). While moving the procedure, the code was partly cleaned up and statement 'WITH GLEntry DO BEGIN' was removed. But this change was not implemented consistently, because in this case 'GLEntry.' should have been placed before "Remaining Amount", just as it is in 'GLEntry.Get(BaseEntryNo)'.
As a consequence of this difference in the procedures (see below), our custom functionality is failing,
Old NAV (2017) code, procedure Apply, page 11309: // Update entry where cursor is on // Update real Table WITH GLEntry DO BEGIN GET(BaseEntryNo); UpdateRealTable( GLEntry,"Remaining Amount" - TotalAppliedAmount, ("Remaining Amount" - TotalAppliedAmount) <> 0,0,0D,0,''); END;
New AL (v. 20.3) code, procedure Apply, table 11307: // Update entry where cursor is on // Update real Table GLEntry.Get(BaseEntryNo); UpdateRealTable( GLEntry, "Remaining Amount" - TotalAppliedAmount, ("Remaining Amount" - TotalAppliedAmount) <> 0, 0, 0D, 0, '');
Our custom functionality is failing, due to the fact that in the new code "Remaining Amount" of table 11307 is sent as a parameter, instead of GLEntry."Remaining Amount", as it was in the old code.
Improvement / Bugfix: // Update entry where cursor is on // Update real Table GLEntry.Get(BaseEntryNo); UpdateRealTable( GLEntry, GLEntry."Remaining Amount" - TotalAppliedAmount, // Added 'GLEntry.' before "Remaining Amount" (GLEntry."Remaining Amount" - TotalAppliedAmount) <> 0, 0, 0D, 0, ''); // Added 'GLEntry.' before "Remaining Amount"
Hello, @AlexanderYakunin . Do you have an update on this request? Please note that this request actually solves the bug introduced when the WITH statement was removed. Thank you.
Hello! This can wait for long time because you added prefix EXTERNAL. And you should report urgent bugs to technical support, not here. We have very limited resources for processing of very large volume of requests, so please use right channel next time.
Availability update: We will publish a fix for this issue in the next update for release 20.
Build ID to track: 47351.
I have fixed this issue for version 20/21/22. Expect to have this fix in next CUs. If you need this urgently, please create ICM for deployment of this change to PROD.
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.
Build ID: 47350.
Availability update: We will publish a fix for this issue in the next update for release 21.
Build ID to track: 47352.