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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Disable Shortcut Keys on Form (View Shortcuts)

(0) ShareShare
ReportReport
Posted on by 384

Dear Experts,

i want to disable the functionality of the delete shortcut (Alt+Delete) on form, because the user is able to delete posted transactions while the delete button is locked.

kindly assist me with the above task.

Regards,

I have the same question (0)
  • nmaenpaa Profile Picture
    101,162 Moderator on at

    Hi sylvestedD365,

    what form are you referring to? If AllowDelete on the form data source is set to No, the user shouldn't be able to delete records via keyboard shortcuts or the button. So it might be possible that you need to evaluate the form properties.

  • Blue Wang Profile Picture
    on at

    HI Sylvester,

    Have you tried to set AllowDelete of datasource?

    143574.PNG

  • sylvesterPowerBi Profile Picture
    384 on at

    hi Nikolaos,

    its a new form created by me , if i set allow delete to false on form properties, i will not be able to delete the unposted transactions, so if there any way to prevent deleting the posted transactions ? i tried in x++ in selectionChanged method and on init but it didn't work

  • sylvesterPowerBi Profile Picture
    384 on at

    Hi Blue Wang,

    i tried but its preventing me from deleting all the records, i only want to delete specific records.

  • Verified answer
    nmaenpaa Profile Picture
    101,162 Moderator on at

    Just put this logic in the active method of your form data source:

    if (some condition)
    {
       MyTable_ds.allowEdit(false);
    }
    else
    {
       MyTable_ds.allowEdit(true);
    }

    Additionally, put similar logic in the validateDelete() method of your table.

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

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans