Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

Sales Order/Invoice Preview Posting Error

Posted on by 1,114

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.

Categories:
  • Suggested answer
    RonakPatil1998 Profile Picture
    RonakPatil1998 4 on at
    Sales Order/Invoice Preview Posting Error
    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;
  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Sales Order/Invoice Preview Posting Error

    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
    tanya07 Profile Picture
    tanya07 1,535 on at
    RE: Sales Order/Invoice Preview Posting Error

    Hi,

    Do you have any customization in this process of posting ?

    Thanks,

    Tanya

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 16th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,349 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,212 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans