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

Sales Order/Invoice Preview Posting Error

(0) ShareShare
ReportReport
Posted on by 1,266

Testing the upgrade to V18.1 from 17.5.  No errors of any kind as part of the upgrade itself.  However, in the upgraded environment we attempt to preview post a sales order or sales invoice we are getting the following message.  Straight posting does NOT get this error.  This error did not occur in 17.5.  We have performed multiple Sandbox upgrades and get this same error.

Commit is prohibited in the current scope. The operation cannot continue. Contact your system administrator.

I have the same question (0)
  • Suggested answer
    tanya07 Profile Picture
    1,638 on at

    Hi,

    Do you have any customization in this process of posting ?

    Thanks,

    Tanya

  • Suggested answer
    Community Member Profile Picture
    on at

    Hello,

    The error sounds like you have an extension effecting the Preview Posting functionality. I would contact your Partner to assist.

    Thanks,

    Steve

  • Suggested answer
    RonakPatil1998 Profile Picture
    on at
    If your using EventSubscriber then you need to check preview posting flag to execute code.

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnAfterPostSalesDoc', '', false, false)]
    local procedure OnAfterPostSalesDoc(var SalesHeader: Record "Sales Header"; var GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"; SalesShptHdrNo: Code[20]; RetRcpHdrNo: Code[20]; SalesInvHdrNo: Code[20]; SalesCrMemoHdrNo: Code[20]; CommitIsSuppressed: Boolean; InvtPickPutaway: Boolean; var CustLedgerEntry: Record "Cust. Ledger Entry"; WhseShip: Boolean; WhseReceiv: Boolean; PreviewMode: Boolean)
        var
            SalesLine: Record "Sales Line";
            IsFullyShipped: Boolean;
        begin
            // Check if the document type is Order
            if SalesHeader."Document Type" <> SalesHeader."Document Type"::Order then
                exit;
            if PreviewMode = false then begin
                // Code to execute without preview mode
            end;
        end;

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,216 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,471 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,369

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans