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

Notifications

Announcements

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)
  • 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.

  • 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().

  • yasu Profile Picture
    on at

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

  • 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.

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

News and Announcements

Season of Giving Solutions is Here!

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 > 🔒一 Microsoft Dynamics AX (Archived)

#1
TAHER Mehdi Profile Picture

TAHER Mehdi 3

#2
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#2
Volodya Profile Picture

Volodya 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans