We have a process where by we pull data via the API (we have written some custom AL code to give us a custom API but the issue is the same with the standard built in API) where data is queried from the "G/L Entry" table. One of the fields that we pull down is the Posting Date - when pulled by the API this comes down as a "Date" type (with no time part). The problem we are having is we cannot find a way to determine which of the line items refer to closing entries... within Dynamics they would appear with a 'C' before the date (which is missing in the API data) and when exported to Excel we can see closing entries also have a time of 23:59:59 but as no time part is pulled we cannot query this either.
I have read some threads online saying to use the SourceCode field and while this does capture many of the closing entries, there are many other closing entries that are missed...
Any advice on how to reliably determine Closing Entries (either via custom AL code or better still just from other existing fields in the API) would be greatly appreciated.
Unfortunately this post doesn't really help as like I said in my original question - many of the closing entries will be marked as CLSIncome in the Source Code but not all of them (I believe it depends on how the closing item was created). There must be a way in which we can guarantee if an item is a closing entry...
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,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156