web
You’re offline. This is a read only version of the page.
close
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

Error while Preview Posting Purchase Invoice.

(3) ShareShare
ReportReport
Posted on by 212
Hi Team,

I am facing an issue in Microsoft Dynamics 365 Business Central while posting a Purchase Invoice. Below are the steps I followed:
 
1. I created two Purchase Orders with the same Vendor & same Location Code and both POs are in Released status.
2. I created a Warehouse Receipt with same location and selected both Purchase Orders as Source Documents.
3. I posted the Warehouse Receipt successfully.
4. After that, I created a Purchase Invoice for the same Vendor.
 
In the Purchase Invoice, I used Get Receipt Lines and selected the Posted Purchase Receipt Lines that were created from the Warehouse Receipt.
When I try to Preview Posting the Purchase Invoice, I get an error also attached error log file.

Is there any setup missing Please advice how to resolved this issue.


I have the same question (0)
  • Suggested answer
    OussamaSabbouh Profile Picture
    5,789 on at
    Hello ,
     
    This is a known Tax Engine bug during Preview Posting when one Purchase Invoice includes multiple receipt lines from different POs.
     
     
    Skip Preview Posting and post directly, or
     
    Invoice each PO/receipt separately
     
     
    No setup is missing.
     
    Regards,
    Oussama Sabbouh
  • Suggested answer
    Aman Kakkar Profile Picture
    2,319 on at
    Hi,
     
    Did you try - One invoice per receipt/PO? Or is it giving the same error?
     
    Also, is this issue coming while Posting the invoice also? Or only during the Preview Posting?
     
    From the error logs - 
    • Preview Posting runs posting logic in simulation mode
    • The Tax Engine tries to Insert or modify Tax Subledger / Tax Posting Buffer.
    • During preview, those records are temporary / not opened.
    • A Modify() or Insert() is executed anyway.
    • AL runtime throws “The record is not open”.
     
    The stack trace is 100% Microsoft code. You can try using debugger to check the values in the stack variables to get to know the real cause.
     
    Hope this helps.
    Aman K
  • Suggested answer
    YUN ZHU Profile Picture
    95,432 Super User 2025 Season 2 on at
    It appears to be a Microsoft issue; I suggest submitting it directly to Microsoft.
     
    Thanks.
    ZHU

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,990

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,576 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,028 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans