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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Override Delete Method : Command Button

(0) ShareShare
ReportReport
Posted on by

I have form which can delete records using the AX Delete Command Button

My Requirement :  After clicking I want the to check the field values in the form  with a particular table.

If the record already exists in a  partilcular table I want an error message a after

clicking delete ...

How can I acheive this?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Erik HB Profile Picture
    205 on at

    You can use the validateDelete() method on the table you are deleting from.  That would have the benefit of calling your validation regardless of which form you are deleting from, and even if you programatically delete records through calling delete() or using the delete_from statement.

    If you need the validation to only happen on this specific form, you can override the validateDelete() method on the form's data source instead.  Note that this way of doing it could result in inconsistent data, as records may be deleted through other means.

  • yasu Profile Picture
    on at

    THNAK YOU SIR.... i WILL DO IT AND LET YOU KNOW ..HOW IT WORKS OUT :) 

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    You could also override aosValidateDelete method on the table, which will get called even if you call a doDelete().

  • Vilmos Kintera Profile Picture
    46,149 on at

    If the answers above have resolved your issue, take your time to tick the checkbox next to the helpful posts to close the topic.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Sagar Suman Profile Picture

Sagar Suman 2 Super User 2026 Season 1

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans