Sunday, February 11, 2024

D365 F&O Relations

 RELATIONS


What is Relation?

A "Relation" refers to a mechanism for establishing connections between tables in the database. In a simple way, you can consider a "Relation" as a link between two tables that allows you to access related data easily. It specifies how records in one table correspond to records in another table.

This linkage is essential for performing operations like querying related data, updating related records, and ensuring data integrity across different tables within the application.


Relations:




  • Normal relation:

normal relation is used to specify field to field relationship. normal relation is used to specify a relationship without any conditions. 

Ex:  Table1.Field = Table2.Field

  • Field Fixed Relation:
This type of relation means that the value in one field is directly related to the value in another field, and this relationship is fixed or predetermined. Without normal relation we can't use the Field Fixed Relation. In a simple way we can say like this, many Perent tables one child table.

Table.Field(Enum) == <EnumValue>
  • Related Field Fixed Relation:
A related field fixed relation is similar to a field fixed relation but with an additional level of connection. This type of relation defines a connection between a field in one table and a related field in another table through an intermediate table. Without normal relation we can't use the Related Field Fixed Relation. In a simple way we can say like this, many Child tables one Perent table

<EnumValue> == Table.Field(Enum)

ForgienKey Relations:

a FOREIGN key relation refers to a relationship between two tables where one table (child table) contains a column that refers to the primary key column of another table (parent table). This relationship helps enforce data integrity and ensures that the values in the child table's column correspond to valid values in the parent table's primary key column.

In simpler terms, it's like having a link between two tables where one table's column values are dependent on the values of another table's primary key column.

  • Field Fixed Relation:
  • This type of relation means that the value in one field is directly related to the value in another field, and this relationship is fixed or predetermined. Without normal relation we can't use the Field Fixed Relation. In a simple way we can say like this, many Perent tables one child table.

    Table.Field(Enum) == <EnumValue>
    • Related Field Fixed Relation:
    A related field fixed relation is similar to a field fixed relation but with an additional level of connection. This type of relation defines a connection between a field in one table and a related field in another table through an intermediate table. Without normal relation we can't use the Related Field Fixed Relation. In a simple way we can say like this, many Child tables one Perent table

    <EnumValue> == Table.Field(Enum)





No comments:

Post a Comment

Retriving the data through Dynamics Query in D365 F&O

 Dynamics Query We use classes to write the Dynamics Queries, dynamic  query that can be used to retrieve data from the database. So, in sim...