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

API for posting journals

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I am currently creating purchase journal lines using Odata endpoint dynamically and the accountant login to the BC to manually post the purchase journal batch.

Is there a way (API) available to do this via API call?

  • Andrew1986 Profile Picture
    Andrew1986 63 on at
    RE: API for posting journals

    Olister Rumao

    We are creating the integration with MS Navision and have some blockers with push payments from our application to MS Navision.

    Could you clarify which default codeunit it is necessary to use to post payments from Payment Journal to Customer Ledger Entry?

    Now, we use the following endpoint to push payments to Payment Journal - host:port/.../CRONUS Canada, Inc./Page/Payment_Journal

    But, we cannot find how to post payments via API.

  • Suggested answer
    Olister Rumao Profile Picture
    Olister Rumao 3,957 on at
    RE: API for posting journals

    Hi James,

    Yes, its possible to do it through ODATA but you will need to develop the extension.

    Refer the link I have sent you in above conversations.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: API for posting journals

    Hi Olister,

    Post action seems to be available by default in Web Services but as codeunit and it exposes SOAP API only (no OData) for it.

    But I guess in order to actually invoke Post Action, I should create extension using the codeunit and expose that as OData?

    Its good to know it is possible, just need to let the management know its possible and see what will be done about it.

    James

  • Suggested answer
    Olister Rumao Profile Picture
    Olister Rumao 3,957 on at
    RE: API for posting journals

    Hi James,

    It is through ODATA and not SOAP.

    I am not sure if the Posting action is available by default in Web Services.

    If you do not have it then you need to develop an extension and then exposes the developed extension object and call through web services.

    If you need more details, feel free to ping me on Whatsapp or Email

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: API for posting journals

    Hi Olister,

    It seems by default, in Web Services tab in BC has Post objects in codeunit type, however it only exposes SOAP API.

    So are you saying that we can we can create AL extension using the SOAP API so that is can be exposed as Page?

    James

  • Suggested answer
    Olister Rumao Profile Picture
    Olister Rumao 3,957 on at
    RE: API for posting journals

    Hi,

    You can create a Webservice bound action.

    In this you will call the Journal posting code unit.

    Refer docs.microsoft.com/.../devenv-creating-and-interacting-with-odatav4-bound-action

  • Suggested answer
    Kalpavruksh D365 CoE Profile Picture
    Kalpavruksh D365 CoE 2,545 on at
    RE: API for posting journals

    Hi James,

    You need to call posting routines without revoking any dialog box in a codeunit and then expose that codeunit as Web Service.

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,309 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans