web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Unanswered

How to determine Closing Entries via API

(0) ShareShare
ReportReport
Posted on by 5

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.

I have the same question (0)
  • DAnny3211 Profile Picture
    11,397 on at
    RE: How to determine Closing Entries via API

    hi

    look this

    community.dynamics.com/.../add-g-l-entry-closing-date-to-api

    DAnieel

  • Louis Miles Profile Picture
    5 on at
    RE: How to determine Closing Entries via API

    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...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,377

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,696 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,512 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans