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

  • Suggested answer
    YUN ZHU Profile Picture
    82,610 Super User 2025 Season 1 on at
    RE: Posting a Positve inventory adjustment via BC Web Services

    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

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,025 Moderator on at
    RE: Posting a Positve inventory adjustment via BC Web Services

    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.

  • G_J_Ceasar Profile Picture
    5 on at
    RE: Posting a Positve inventory adjustment via BC Web Services

    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,025 Moderator on at
    RE: Posting a Positve inventory adjustment via BC Web Services

    And here is the source for the standard API's

    github.com/.../pages

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,025 Moderator on at
    RE: Posting a Positve inventory adjustment via BC Web Services

    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
    Marco Mels Profile Picture
    on at
    RE: Posting a Positve inventory adjustment via BC Web Services

    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.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

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

#1
YUN ZHU Profile Picture

YUN ZHU 311 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 242

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 201 Most Valuable Professional

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans