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

API Post General Journals

(3) ShareShare
ReportReport
Posted on by 43
Dear all,
 
Since a couple weeks Business Central does not import anymore the description for batch posting, which means for the journal lines that have no Account_No:
 
If I send the following JSON to Business Central it does not import the description:
 
    {
        "Journal_Template_Name": "ALLGEMEIN",
        "Journal_Batch_Name": "TEST",
        "Line_No": 10000,
        "Document_No": "G00008",
        "Posting_Date": "2025-02-24",
        "Account_Type": "Bank Account",
        "Account_No": "",
        "Bal_Account_Type": "G/L Account",
        "Bal_Account_No": "6000",
        "Amount": 27409.75,
        "Description": "Credit Note 12434232",
        "Currency_Code": "",
        "Bal_Gen_Posting_Type": null,
        "Bal_VAT_Bus_Posting_Group": null,
        "Bal_VAT_Prod_Posting_Group": null
      }


The description is "Credit Note 12434232" , however, BC ignores the description and fills in as description the name of the G/L account.

I noticed that on the G/L card there is a new setting called: Omit default Descr. in JNL. However, it does not help.


The description is the name of the G/L account and the description of the JSON is ignored. This only happens if the Account_No. is null. 
 
 
Does anyone know why it does not import anymore the description if "Account_No": ""? 

I know you could run a PTCH for each line but that would be very cumbersome. Does anyone has an explanation or solution to this problem?

Thanks for the help.
 
I have the same question (1)
  • Suggested answer
    Aman Kakkar Profile Picture
    995 on at
    API Post General Journals
    Hi,
     

    You're absolutely right — the Omit Default Descr. in Jnl. setting does not apply to the Bal. Account No. field.

    From my observations, when the Account No. field is not empty, Business Central correctly takes the Description value provided in the API request.

    However, when the Account No. field is blank, the system ignores the provided description and instead uses the Bal. Account Name as the description.

     

    Here’s the relevant section of the standard logic in the Gen. Journal Line table:


     
    If you’d like your API to always retain the description sent in the payload, you can subscribe to the following event to bypass that behavior.

    To ensure this customization only applies in your specific case and doesn’t affect standard processing, it’s best to introduce a Boolean identifier field (e.g., Identifier) and send it as true in your API call.
     
    [EventSubscriber(ObjectType::Table, Database::"Gen. Journal Line", 'OnBeforeIsAdHocBalAccDescription', '', false, false)]
    local procedure OnBeforeIsAdHocBalAccDescription(GenJournalLine: Record "Gen. Journal Line"; xGenJournalLine: Record "Gen. Journal Line"; var Result: Boolean; var IsHandled: Boolean)
    begin
        if GenJournalLine.Identifier then begin
            Result := true;
            IsHandled := true;
        end;
    end;
    
    With this approach, the system will always use the description you provide through the API instead of replacing it with the Bal. Account Name.
     
     
     
    Do mark as verified if this helps.
    Aman K

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 2,762

#2
Sumit Singh Profile Picture

Sumit Singh 2,573

#3
YUN ZHU Profile Picture

YUN ZHU 1,930 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans