Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

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

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 

  • Verified answer
    sohaibcheema Profile Picture
    sohaibcheema 46,590 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
    Azam 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
    Azam 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
    Iulian Cordobin 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
    Temur Mukbaniani 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
    sohaibcheema Profile Picture
    sohaibcheema 46,590 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

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,663 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,741 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Featured topics

Product updates

Dynamics 365 release plans