web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Removing Cancel button while posting Sales Order

(1) ShareShare
ReportReport
Posted on by 238
Dear experts,
I have to Remove cancel button when user clieck on post then ship and invoice then while posting one dialog box window shows processing and entries posting this also has cancel buttton i need to Remove this button so that no user can cancel posting can anyone help Thanks in advance please find Following SS for Ref.
 
I have the same question (0)
  • Kamal Khakhkhar Profile Picture
    1,989 on at
    Hii there,
    as per your requirement you need to add code on event of "codeunit 80 "Sales-Post"-> OnBeforeInitPostATO" you need to pass HideProgressWindow=False; as per below.
     
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforeInitPostATO', '', false, false)]
    local procedure OnBeforeInitPostATO(HideProgressWindow: Boolean; SalesHeader: Record "Sales Header"; var AsmPost: Codeunit "Assembly-Post"; var IsHandled: Boolean; var SalesLine: Record "Sales Line")
     
    begin
    HideProgressWindow := false;
    end;
     
    If You get your answer , Mark it answered.
    Thank You,
    Kamal Khakhkhar.
  • DineshM Profile Picture
    238 on at
    Hi 
    I have tried following Event but not working
    codeunit 50008 "All sub"
    {
        [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforePostATO', '', false, false)]
        local procedure OnBeforePostATO(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var TempPostedATOLink: Record "Posted Assemble-to-Order Link" temporary; var AsmPost: Codeunit "Assembly-Post"; var ItemJnlPostLine: Codeunit "Item Jnl.-Post Line"; var ResJnlPostLine: Codeunit "Res. Jnl.-Post Line"; var WhseJnlPostLine: Codeunit "Whse. Jnl.-Register Line"; HideProgressWindow: Boolean; var IsHandled: Boolean)
        begin
            HideProgressWindow := false;
        end;
     
        [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforePostSalesDoc', '', false, false)]
        local procedure OnBeforePostSalesDoc(var SalesHeader: Record "Sales Header"; CommitIsSuppressed: Boolean; PreviewMode: Boolean; var HideProgressWindow: Boolean)
        begin
            HideProgressWindow := false;
        end;
     
        [EventSubscriber(ObjectType::Codeunit, Codeunit::"Sales-Post", 'OnBeforeInitPostATO', '', false, false)]
        local procedure OnBeforeInitPostATO(SalesHeader: Record "Sales Header"; var SalesLine: Record "Sales Line"; var AsmPost: Codeunit "Assembly-Post"; HideProgressWindow: Boolean; var IsHandled: Boolean)
        begin
            HideProgressWindow := false;
        end;
     
    }
  • Verified answer
    KasparsSemjonovs Profile Picture
    4,807 Super User 2026 Season 1 on at
    From the logic I would say HideProgressWindow=True;  would indicate that You want to hide the progress window... 
    but I am not a developer, and haven't used this myself.
  • Verified answer
    YUN ZHU Profile Picture
    97,471 Super User 2026 Season 1 on at
    Hi, KasparsSemjonovs is right, I've tested it.
     
    Hope this helps.
    Thanks.
    ZHU
  • Verified answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,296 Super User 2026 Season 1 on at
    You should use HideProgressWindow=True because you want to hide the progress window.
  • DineshM Profile Picture
    238 on at
    Thank you for Responce.@Kamal Khakhkhar,@TeddyH ,@YUN ZHU and blog for same @KasparsSemjonovs.

    Got Solution 

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,117 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 1,026 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans