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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

SO Posting Error: Document No. must have a value in Gen. Journal Line: Journal Template

(8) ShareShare
ReportReport
Posted on by 24
Hi All,
 
I get this error when I try to post a sales order.
Document No. must have a value in Gen. Journal Line: Journal Template Name=, Journal Batch Name=, Line No.=0. It cannot be zero or empty.
 
I checked with different items and customers, but it's the same.  Could you kindly help me to resolve this? Thanks in advance.
 
SO Error.png
I have the same question (0)
  • Suggested answer
    Pallavi Phade Profile Picture
    5,420 Super User 2026 Season 1 on at
    Namaste @Hasi-K
     
    Ensure Posting No series for invoice and Shipment is setup in Sales Recievables setup or Posted No series Setup. IF posting number is blank system would have given other error
     
    It seems some customization done after posting .  Can you please check cusotmizations done . 
     
     
    Warm Regards
    Pallavi Phade
    www.linkedin.com/in/pallaviphade131116
  • Hasi-K Profile Picture
    24 on at
    Hi Pallavi,
    Thank you very much for your reply. I checked the posting no series as you suggested and they seem to be ok (please see the image). I'm unsure about the customizations and I'll check it too. Thank you!
     
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,128 Super User 2026 Season 1 on at
    It is usually caused by missing No. Series setup or custom code inserting journal lines without assigning Document No.
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,128 Super User 2026 Season 1 on at
    @Hasi-K I have just seen your screenshot. Could you please check if there is any custom code related to the Sales Order? If any custom extension is installed, try removing it and then check again.
  • Suggested answer
    Assisted by AI
    Sumit Singh Profile Picture
    11,757 Super User 2026 Season 1 on at
    Hi, 
    1. Verify No. Series Setup
      • Check Sales & Receivables Setup → Posting No. Series for Sales Orders, Shipments, and Invoices.
      • Ensure all required series exist and are assigned correctly.
    2. Inspect Customizations
      • Review any extensions or custom code that insert Gen. Journal Lines during posting.
      • Confirm they assign a valid Document No. before posting.
    3. Debug Posting Routine
      • Use Debugger or Event Subscriber tracing to identify where Gen. Journal Line is created with Line No.=0.
      • If custom logic bypasses standard number assignment, fix or remove it.
    4. Test in Standard Environment
      • Replicate in a vanilla sandbox to confirm if issue is standard or customization-related.
    Reasoning:The error occurs because Document No. is mandatory for journal lines. Missing No. Series or faulty custom code typically causes this. Fixing setup or removing incorrect custom logic resolves it quickly.
     
  • Dynamics_Decoded_Gokul Profile Picture
    487 on at
    Hi, 

    Could check uninstalling your custom solution app file, this we will get sometime if we customized posting any additional Gen journals in the Code or if your using any additional Add-on's it might try to perform its activity 

    Thanks
    Gokulnath
  • RockwithNav Profile Picture
    8,947 Super User 2026 Season 1 on at
    This is strange, as you are experiencing this on Sales Orders. It would still make sense if it were happening on journals, but not here. Are there any custom extensions or code running in the environment? Please try uninstalling the additional extension and then verify again.
  • Suggested answer
    YUN ZHU Profile Picture
    99,084 Super User 2026 Season 1 on at
    This appears to be a customization issue. I suggest you uninstall the third-party extension and try recreating the order.
     
    Thanks.
    ZHU
  • Suggested answer
    Kamal Khakhkhar Profile Picture
    2,915 on at
    hii there,
    as per requirement you need to create a template as per requirement as its  transaction seems of G/L Account , so data is flow from Sales Header to Gen. Journal Line to G/L Entry . shared reference as per below from Blog of YUN ZHU.
     
    so check that the template batch is available or not .

    Or Else first remove custom Extension regurding Gen. Journal Line. sales , G/L Entry . as per other members suggested.
     
    If you found answer mark it answered.
     
    Thank You.
    Kamal Khakhkhar.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,946 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,177 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 555 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans