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

Notifications

Announcements

No record found.

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

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
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans