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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

OData API - Item Journals

(0) ShareShare
ReportReport
Posted on by 841

So I am testing out against a BC 365 Version: W1 19.1 on-prem environment. I've exposed the Item Journals OData endpoint, as I'm attempting to import in on-hand items. In order to properly perform site allocations I need to create item journal entries. This works fine issuing POST requests against the item journals endpoint. But the result is that the item journal entries are sitting out there waiting to be posted in BC. At the end of the day we are looking at importing 20-25K items into BC. Not sure about how large the item journals bucket can grow, the prospect of batching out groups of item journal entries to post, etc.

By default I am assuming the item journals OData API endpoint doesn't provide an action method to post these, correct? What is the solution path for this? I ran across mention of creating a custom AL Codeunit extension that would create an OData bound action for posting these. Is that the only way?

  • Greg Kujawa Profile Picture
    841 on at

    The qualifier about this is that it's a testing on-prem environment. So when I try to publish custom AL extensions from Visual Studio Code I get an error back that my licensing doesn't allow for this. Specifically this is kicked back --> default failed with code UnprocessableEntity. Reason: Your program license does not allow you to publish  

  • Suggested answer
    YUN ZHU Profile Picture
    104,090 Super User 2026 Season 2 on at

    Hi, Yes, the On-Pre version requires a development license, but the SaaS version does not. You can sign up for a Trial Tenant and try it out.

    Sign up for a free trial: https://dynamics.microsoft.com/en-us/get-started/?appname=businesscentral

    As for the question above, instead of creating an OData bound action, you can also define a Codeunit or Report first, and then periodically run it in the Job Queue.

    pastedimage1643933629952v1.png

    Hope this will help.

    Thanks.

    ZHU

  • Greg Kujawa Profile Picture
    841 on at

    Thanks for the insight! I don't think that scheduling this to run in the job queue would be as effective as my just iterating through my item import routine through code -- 1) creating the new item, 2) assigning its item category, 3) assigning item site allocations through a posted item journal entry.

    Looking in BC's Web Services I created a new Codeunit endpoint associated with Object ID 241, Object Name Item Jnl.-Post. After doing so I now have a SOAP API endpoint that's defined as http://{myServerName}:9047/{myInstanceName}/WS/{myCompanyName}/Codeunit/ItemJournalPost. Don't see any exposed methods or parameters that would logically facilitate this action, however.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 665 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 418 Super User 2026 Season 2

#3
Teagen Boll Profile Picture

Teagen Boll 280 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans