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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

Posting a Positve inventory adjustment via BC Web Services

(0) ShareShare
ReportReport
Posted on by 5

Can anyone point me towards actual real-life examples (pref. code examples) of how someone actually - for-real - posted a inventory quantity adjustment via the BC Web Services (using either the OData or SOAP version)?

I've read a lot of suggestions that it is possible, but never any convincing evidence.  Every lead is as slippery as an alien spaceship sighting.

To be clear, I'm wanting to do (via Web Service) essentially what one does in this UI ...

bc_5F00_item_5F00_journal_5F00_entry.png

There are rumors one can do it via the CodeUnit-22 web service, but without documentation it's just a lot of trial and error to figure out how to do it.

codeunit_2D00_22.png

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    We currently do not have dedicated Dev support via the Dynamics 365 Business Central forums, but I wanted to provide you some additional resources to assist. If you need assistance with debugging or coding I would recommend discussing this on one of our communities.

    www.yammer.com/dynamicsnavdev

    www.dynamicsuser.net/.../14

    I will open this up to the community in case they have something to add.

    Thanks.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    In my eyes your best option is to build a custom API for this

    learn.microsoft.com/.../devenv-develop-custom-api

    There is a standard API for G/L Journals and you can probably copy the way they handle it in that API.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    And here is the source for the standard API's

    github.com/.../pages

  • G_J_Ceasar Profile Picture
    5 on at

    Mind blown ... ok.

    Am I right in translating this to mean that the custom API I'd create is essentially just doing CRUD on the database table?

    Suppose that the "client" of this API was going to run on the same server as BC's SQL database, wouldn't it just be easier for me to do straight inserts into the table?

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,111 Moderator on at

    You should never insert data directly into a BC database.

    Using the API makes sure that the business logic in Business Central is processed as you enter data into the system. That would not be the case with a direct SQL insert. 

    And this is especially important when it comes to transactional data like the journal lines.

    So please use the API's.

  • Suggested answer
    YUN ZHU Profile Picture
    95,729 Super User 2025 Season 2 on at

    Hi, hope the following helps.

       

    https://github.com/ethan-sorenson/PostOrdersWebService

    And standard apis in Business Central:

    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/resources/dynamics_salesorder

    pastedimage1666225364403v1.png

    https://yzhums.com/6117/

    Hope this helps as well.

    Thanks.

    ZHU

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 2,362

#2
YUN ZHU Profile Picture

YUN ZHU 867 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 607

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans