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

ShortCutKey - Property

(1) ShareShare
ReportReport
Posted on by 89
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
 
  • Suggested answer
    YUN ZHU Profile Picture
    79,097 Super User 2025 Season 1 on at
    ShortCutKey - Property
    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
  • Suggested answer
    SÖ-17061501-0 Profile Picture
    89 on at
    ShortCutKey - Property
    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
    79,097 Super User 2025 Season 1 on at
    ShortCutKey - Property
    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
    Mohamed Amine Mahmoudi Profile Picture
    17,492 Super User 2025 Season 1 on at
    ShortCutKey - Property
    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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,207 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,923 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans