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

Community site session details

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

How to suppress or modify Delete confirmation message

(0) ShareShare
ReportReport
Posted on by 833

How do I suppress or modify the Delete confirmation message when the dustbin/trashcan button is clicked (see example below)?

In this case it's my custom page and table. I am handling the OnDeleteRecordEvent. This is working fine except I now get two confirmation dialogs. The one above, and my custom one below. I either want to suppress the first/default one, or move the code that drives the second one in to a handler for the first one.

I tried the Event Recorder but it didn't show any useful information.
I thought of disabling the dustbin/trashcan button with DeleteAllowed = false; and then adding my own Delete Action on the menu, but that seems a bit awkward? Is there a more elegant solution?

I have the same question (0)
  • steveendow Profile Picture
    2,281 on at
    RE: How to suppress or modify Delete confirmation message

    Hi Nick,

    I posted you question on Twitter and received this response:

    twitter.com/.../1665785496264474624

    He is using Delete on OnDeleteRecordEvent that why the he gets confirm twice => 1st std confirm, 2nd custom confirm.

    He should add an action to the page with basic code:

    If Confirm(MyFancyMsg) then

    Rec.Delete(true);

     

    Would that work for you?

  • Nick Webb Profile Picture
    833 on at
    RE: How to suppress or modify Delete confirmation message

    Thanks so much for posting my question on Twitter. So, the answer, is saying I should go with my awkward solution above, where I disable the dustbin/trashcan button and create my own Delete action. I'm surprised there's no way to customise what happens when the dustbin/trashcan button is clicked, but so be it. Thanks again.

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 4,285

#2
Sumit Singh Profile Picture

Sumit Singh 2,725

#3
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 2,526

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans