Skip to main content

Notifications

Announcements

No record found.

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

  • Verified answer
    Sohaib Cheema Profile Picture
    46,614 User Group Leader on at
    RE: How to Restrict deletion of a record if its id is in use

    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

  • Azam  Profile Picture
    385 on at
    RE: How to Restrict deletion of a record if its id is in use

    how to  use DeleteAction to restrict the deletion

  • Azam  Profile Picture
    385 on at
    RE: How to Restrict deletion of a record if its id is in use

    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

     

  • Verified answer
    Iulian Cordobin Profile Picture
    8,201 on at
    RE: How to Restrict deletion of a record if its id is in use

    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.

  • Temur Mukbaniani Profile Picture
    260 on at
    RE: How to Restrict deletion of a record if its id is in use

    Hi Muhammad,

    what do you mean by "is in use"?

    Have you referred to this link?

  • Suggested answer
    Sohaib Cheema Profile Picture
    46,614 User Group Leader on at
    RE: How to Restrict deletion of a record if its id is in use

    you need to define "In Use"

    if you are referring to child-parent records, "delete actions" is the answer, with type 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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,041 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,856 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans