Tuesday, February 5, 2013

Relations

The foundation of Microsoft Dynamics AX is the relational database.
In AX, the relationship between tables is called a relation, that contain related data.

Relations in Microsoft Dynamics AX:
  1. Keep the database consistent (enforce referential integrity).
  2. Enable the look up of values in other tables .
  3. Are used to validate data.
  4. Are used by the Auto Join system in forms.
  5. Automatically propagate changes from one table to another.
  6. Auto-define table relationships in queries.
Uses: Table relations are most commonly used in form fields to enable the look up of information in another table.
If a table relation exists, the lookup button can be used to display a lookup list of values for a particular field.

Different Types:

Normal to specify relation fields without conditions.

Ex: 

Field fixed to specify relation fields to restrict the records in the primary table.
Format: Table.Field == <EnumValue>
Restricts the records selected in the primary table. Only records that meet the condition are selected.The condition is ANDed with your relation.
Ex:
 
Related field fixed to specify relation fields that restrict the records in the related table.
Format: <EnumValue>==Table.Field
Restricts the records selected in the related table. Only records that meet the condition are selected.The condition is ANDed with your relation.

Ex


Newly Added in Axapta-2012:
ForeignKey to specify a correspondence between a foreign key field in the present table to the primary key field in another parent table.
For more information: http://msdn.microsoft.com/en-us/library/aa556809.aspx


 

No comments:

Post a Comment

update_recordset with joins

 update_recordset with joins update_recordSet storeTransfer         setting      TransactionId = transfertable.TransferId     join transfert...