Skip to main content

Notifications

Small and medium business | Business Central, N...
Unanswered

How to determine Closing Entries via API

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.

  • Louis Miles Profile Picture
    Louis Miles 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...

  • DAnny3211 Profile Picture
    DAnny3211 9,272 Super User 2024 Season 1 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

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

New! Quick response templatesâš¡

Save time with the new custom templates!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,188 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,030 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans