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

Community site session details

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

How to post both debit and credit lines in a single journal entry via Business Central API?

(0) ShareShare
ReportReport
Posted on by

Right now, I can only send one line per request.

Is it possible to post both debit and credit lines for the same journal entry in a single API call, or do I need to use multiple requests

 
 
 
 
I have the same question (0)
  • Suggested answer
    Pallavi Phade Profile Picture
    125 on at
    How to post both debit and credit lines in a single journal entry via Business Central API?
    Namaste,
     
    Below is functional approach from Business user

    When creating a journal entry, you need to include:

    • Account Type and Account No.

    • Balance Account Type and Balance Account No.

    With these fields provided, you can pass a single journal entry. The system will automatically create the balancing entries:

    • A Debit entry for the Account Type

    • A Credit entry for the Balance Account Type

    This way, you don’t need to pass two separate lines for debit and Credit.

    API Approach::

    API calls can be made line by line to insert data (document wise considering accoutn & bal. account type in same line ) into the General Journal Line table in Business Central . The actual posting of a document or batch is handled within Business Central

    • If you are working with a document-based approach, you can send the Document Number as a parameter from your API. Business Central will group all lines with the same Document Number and post them together in one go.

    • If you are working with a unique batch, you can insert all the lines first and then post the batch at the end with a single POST command in codeunit 12.

     IF you find this answer helpful , please verify the answer .

     Regards

    Pallavi Phade


       

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,669 Super User 2025 Season 2

#2
Sumit Singh Profile Picture

Sumit Singh 2,668

#3
Jeffrey Bulanadi Profile Picture

Jeffrey Bulanadi 2,203

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans