Closed ClintonSaundersSeeSide closed 11 months ago
Let's get the issue to a team who will fix and backport it, as this repository is only for issues related to the AL compiler in latest developer preview environment for Dynamics 365 Business Central. We suggest that you open a support case or file a bug in Collaborate, to ensure that all Business Central users benefit from your catch as soon as possible.
To open a support case, you can:
If you file the bug in Collaborate, remember to include steps to reproduce the issue, and the Business Central build number and country version you're using.
Please include the following with each issue:
1. Describe the bug When writing extensions that run the above codeunit (and therefor executing the OnRun trigger), a "Record already exists in the Statistical Ledger Entry table". The normal posting routine that starts with Codeunit 2626 : Stat. Acc. Post. Batch does not produce the same error because it does not use the OnRun trigger in codeunit 2624.
2. To Reproduce Write code to populate the "Statistical Acc. Journal Line" table, then run codeunit 2624 and passing the newly created Journal Line.
Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.
3. Expected behavior A new Statistical Ledger Entry should be created
4. Actual behavior A "Record Already exists in the Statistical Ledger Entry Table" is produced, becauase the system tries to use the last Entry No. in the Statistical Ledger Entry table as the Entry No for the new entry.
5. Versions:
Final Checklist
Please remember to do the following:
[x] Search the issue repository to ensure you are reporting a new issue
[x] Reproduce the issue after disabling all extensions except the AL Language extension
[x] Simplify your code around the issue to better isolate the problem