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...
Answered

Show or hide header's Actions menu base on lines value (Purchase Order)

(0) ShareShare
ReportReport
Posted on by 307

How to show or hide an action menu in Purchase header when a line is modified

Line

I can do easily to show or hide Lines Action menu when Line column values are modified but I cannot know how to set on Header Action 

Thanks

I have the same question (0)
  • Verified answer
    Govinda Kumar Profile Picture
    2,304 Moderator on at

    Hi peter,

    I think to show/hide actions on the header from the lines, you would need to create a custom flag on the header. This custom flag on the header is updated based on the modification you make on lines. Then, on the actions of the document page (which you want to hide/show), you would have to set the visibility flag variable. This variable is updated in the OnAfterGetCurrentRecord trigger of your page, based on the custom flag value that you just update from the line..

    sample code..

    pageextension 50000 "Purchase Order Ext" extends "Purchase Order"
    {
        actions
        {
            modify(YourAction)
            {
                Visible = HideActionVariable;
            }
        }
        trigger OnAfterGetCurrRecord()
        begin
            if (Rec.CustomHideActionField = true) then
                HideActionVariable := true;
            else
                HideActionVariable := false;
        end;
        var
            HideActionVariable: Boolean;
    }

    Hope it helps..

    Regards

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 March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,796 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 965 Super User 2026 Season 1

#3
Teagen Boll Profile Picture

Teagen Boll 664 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans