Skip to main content

Notifications

Small and medium business | Business Central, N...
Unanswered

How to suppress or modify Delete confirmation message

Posted on by 670

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?

  • Nick Webb Profile Picture
    Nick Webb 670 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.

  • steveendow Profile Picture
    steveendow 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?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,134 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,928 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans