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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to Restrict deletion of a record if its id is in use

(0) ShareShare
ReportReport
Posted on by 385

Dear All

I have make a table and form for create data ,

I want to restrict  deletion of  a record if its id is in use 

please help me 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 1 on at

    you need to define "In Use"

    if you are referring to child-parent records, "delete actions" is the answer, with type Restricted

  • Temur Mukbaniani Profile Picture
    260 on at

    Hi Muhammad,

    what do you mean by "is in use"?

    Have you referred to this link?

  • Verified answer
    Iulian Cordobin Profile Picture
    8,201 on at

    You have two options:

    a) you can use a Relation to define the link between your custom records and where they are used, and use a DeleteAction to restrict the deletion on the table where they are used.

    b) you can write code in the validateDelete method on the table and implement the checking logic here.

  • Azam Profile Picture
    385 on at

    Hi Temur Mukbaniani

    I make a RoutTable and 

    I have attached RoutId with customer in custtable , and 

    I want to restrict deletion of  routeid witch use with customer

     

  • Azam Profile Picture
    385 on at

    how to  use DeleteAction to restrict the deletion

  • Verified answer
    Sohaib Cheema Profile Picture
    49,668 Super User 2026 Season 1 on at

    msdn should help here

    msdn.microsoft.com/.../bb315018.aspx

    shortly

    1) create relationship on child table (relationship between child and header table)

    2) go to parent table and expand it. reach to delete actions.

    3) right click and click on create new delete action. right click newly created delete action and click on properties. mention name of child table. and for property delete  action select Restricted

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans