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 :
Finance | Project Operations, Human Resources, ...
Answered

How to restrict from creating new record in child table, if the record doesn't exist in the parent table.

(0) ShareShare
ReportReport
Posted on by 266

Hi Everyone, Am beginner in MD365FO, Can you please help me here.

We have two tables. 

1. Parent Table

2. Child Table

We have records in both tables, If i want to create a new record in the child table that does not exist in the parent table, It should not create the record.

Please help here. If it is the code also,please paste it. Thanks in advance

I have the same question (0)
  • Verified answer
    WillWU Profile Picture
    22,363 on at

    Hi Sloka,

    I think you are talking about Referential integrity, the database of d365fo follows this.

    The foundation of D365FO is the relational database. Relationships can be created between tables that contain related data. In D365FO, the relationship between tables is called a relation.

    Relations in D365FO:

    -Keep the database consistent (enforce referential integrity).

    -Are used by the Auto Join system in forms.

    -Enable the look up of values in other tables (through lookup list/selection list boxes and the View details Form command).

    -Are used to validate data.

    -Automatically propagate changes from one table to another.

    -Auto-define table relationships in queries.

    This is the document about creating Relation in ax2012, which also applies to d365fo :

    docs.microsoft.com/.../best-practices-for-table-relations

    In your case, just need to set the validation property of the relation to Yes.

    0167.pastedimage1599459732541v1.png

  • Rafia Mohammed Profile Picture
    266 on at

    Thank you so much for the information.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 471 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 423 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans