Relations between
tables are used to:
* Associate rows in
one table to rows in another table.
• Enforce business
rules across tables
• Create auto joins in
forms (join one table to another table).
• Look up values in
other tables (using lookups and the View Details command).
• Validate data by
providing constraints
• Automatically
propagate changes from one table to another by defining cascading relations.
• Generating field
help (hover over a field, and data from the related table is displayed).
Relationships can be
created between tables using MorphX
• These relations are
defined within the Microsoft Dynamics AX application and not at the physical
database level.
• Relations govern the
relationships between data in different tables such as foreign key
relationships.
• Foreign key
relationships between tables are always formed from the parent table.
Under the relations
node you can create different types of relationships between the parent table
and other tables in Microsoft Dynamics AX.
• Normal: Specifies related
fields in another table. Multiple fields can be included in this relation.
For example, table
LogisticsPostalAddress has a relation called State that defines the relation to
the LogisticsAddressState table. The values allowed in the state field are
limited depending on which country is entered.
• Field fixed:Specifies related
fields that restrict the records in the primary table. The fixed field is
normally an enum.
• Related field:Fixed specifies
related fields that restrict the records in the related table. The related
fixed field is normally an enum.
• ForeignKey: Specifies a
correspondence between a foreign key field in the present table to the primary
key field in another parent table. A ForeignKey can be a PrimaryKey or a Single
Field Altenate Key.
When it is a Primary
Key, the relation is on the primary key field, for example customer account.
When it is a Single Field Alternate Key, the relation is on the surrogate key,
which is usually the RecId.
To see an example on: How to create a relation - Go here
To see an example on: How to create a relation - Go here
No comments:
Post a Comment