Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Answered

Identify Close Income Statement Postings in OData Response

Posted on by 15
Hello
 
we are using OData to extract information from Webservices created in Business Central such as glEntry. Now there is a specific requirement to identify records that have a posting date prefixed with the letter /C/ on the GUI indicating an income statement closing (German prefix /U/ for Ultimobuchung/GuV Nullstellung).
 
Previously in Navision when the postingDate still had a timestamp such records were identified by having a timestamp equal to /23:23:59/ but using OData calls the response exposed for the postingDate does not have a timestamp and is only a regular date without any prefix- no other fields in the response to the OData call indicate the fictitious date between the last day of the old fiscal year and the first day of the new year.
 
Please provide feedback on how to identify close income statement posting (shown with a letter prefix to the posting date on the GUI) in the OData response where only the date component for the posting date is returned.
 
Best regards
  • Suggested answer
    StAbNVX Profile Picture
    StAbNVX 15 on at
    Identify Close Income Statement Postings in OData Response
    Again, thank you KasparsSemjonovs for the hint that lead me to another post with the solution I was looking for https://www.dynamicsuser.net/t/closing-dates-and-odata-how-to-query-and-use-in-external-clients/76072
     
    Tl;dr: 
    to get all close income statement, which are postings on that fictitious date between the last day of the old fiscal year and the first day of the new year, append the following filter to the OData Request
     
    ?$filter=postingDate gt 2022-12-31 and postingDate lt 2023-01-01
  • StAbNVX Profile Picture
    StAbNVX 15 on at
    Identify Close Income Statement Postings in OData Response
    Thank you for your reply KasparsSemjonovs
     
     
    Unfortunately the filter by field Source Code: CLSINCOME only returns postings which have been created by the function however it would not include manual postings which are also relevant to evaluate. 
     
  • Suggested answer
    KasparsSemjonovs Profile Picture
    KasparsSemjonovs 3,276 Super User on at
    Identify Close Income Statement Postings in OData Response
    You can filter such entries by field Source Code: CLSINCOME. You can check if You have the same in "Source Code Setup" for Close Income Statement.
      Additionally add filter for Posting Date for 31st of December for the needed year.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans