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 216
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,798 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,449 Super User 2025 Season 2 on at
    It appears to be a Microsoft issue; I suggest submitting it directly to Microsoft.
     
    Thanks.
    ZHU
  • Suggested answer
    CU08050848-0 Profile Picture
    216 on at

    Hello Oussama Sabbouh,

    Thanks for your reply.

    I am facing the same error when clicking the Post button as well.

    I have two sandbox environments: one is Development and the second is UAT.

    The above scenario is working fine in the Development environment, but I am facing the issue in the UAT environment.

    In the Development environment, both Post and Preview Posting are working fine.

     

  • Suggested answer
    CU08050848-0 Profile Picture
    216 on at
    Hello YUN ZHU,
     
    Thanks for your reply.
     
    I am facing the same error when clicking the Post button as well.
     
    I have two sandbox environments: one is Development and the second is UAT.
     
    The above scenario is working fine in the Development environment, but I am facing the issue in the UAT environment.
    In the Development environment, both Post and Preview Posting are working fine.
  • Suggested answer
    Alex A Profile Picture
    2,884 on at
    Don't use a Purchase Invoice and Get Receipt Lines for the POs that have been received.
     
    You should be posting the invoices directly from the Purchase Orders, by posting the Purchase Orders themselves.
     
     
     
    Regards,
     
     
    If this lends to your success please mark the answer.

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 3,064

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,063 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans