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

Sales Order/Invoice Preview Posting Error

(0) ShareShare
ReportReport
Posted on by 1,204

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

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,606

#2
YUN ZHU Profile Picture

YUN ZHU 931 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans