Skip to main content

Notifications

Announcements

No record found.

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

How to suppress or modify Delete confirmation message

(0) ShareShare
ReportReport
Posted on by 690

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 690 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans