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)

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,438 User Group Leader 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,438 User Group Leader 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

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Sukrut Parab Profile Picture

Sukrut Parab 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans