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

Notifications

Announcements

Community site session details

Community site session details

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

ShortCutKey - Property

(1) ShareShare
ReportReport
Posted on by 230
Hello, 
 
I have read these articles:
 
I want the user be able to use the shortcutkey.
However i dont want the action to be visible to the user.
If i set the Visible property to false i can no longer use the shortcut. 
If i set the visible to true and the editable to false, i can also no longer use the shortcutkeypropery.
 
            action("test")
            {
                Caption = 'test';
                Promoted = true;
                Visible = true;
                Enabled = false;
                ShortcutKey = 'Ctrl+F6';
                ApplicationArea = All;
                trigger OnAction()
                begin
                    ShowField := true;
                    Message('HalloWelt');
                end;
            }
 
Is there anyone who has a solution?
Thanks in advance, 
Dear Community
 
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,546 Super User 2025 Season 2 on at
    Hi,
     
    I think you can add if statement in your trigger method to prevent the execution of code :
    for e.g.
    trigger OnAction()
    begin
       if showField = tue then begin
       // Your Logic Here
       end;
    end;
    Best regrds,
    Mohamed Amine MAHMOUDI
  • Suggested answer
    YUN ZHU Profile Picture
    95,987 Super User 2025 Season 2 on at
    I also think Mohamed's approach is correct, you can only find a way to disable the code from running, you can't hide it.
    You can consider not promoting the action so that users can't find it so easily.
     
     
    Hope this helps.
    Thanks.
    ZHU
  • Suggested answer
    SÖ-17061501-0 Profile Picture
    230 on at
    First of all, thank you for your thoughts. 
    After thinking about this technical problem, i have come to the conclusion that it is not possible
    to solve this problem via ShortCutKey property. 
    I must talk to the client and propose to solve this problem via a flag in the permission set. 
     
    Thanks to 
  • Suggested answer
    YUN ZHU Profile Picture
    95,987 Super User 2025 Season 2 on at
    I personally don't think it makes any difference to display the action on the page. If the client minds this, then do all unused actions on the standard page have to be hidden?
    I think you can try to convince them. Although it may be a bit difficult.
     
     
    Thanks.
    ZHU

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

News and Announcements

Season of Giving Solutions is Here!

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 1,810

#2
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 810 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 676 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans