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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans