Posted on

Table Relations (Normal , Related Field Fixed , Field Fixed) in AX 2012

Table Relations (Normal, Related Field Fixed, Field Fixed)

Lets say you have ClothesTable and ClothesOrders.
ClothesTable has the following fields: ClotheId, Name and CollectionTypeId
ClothesOrder has the following fields: OrderId, ClotheId, Qty OrderId could be a number sequence and Qty entered manually by the user.

CollectionTypeId has the following elements:
0 – Men
1 – Women
2 – Children 
Example 1: Related Fixed FieldOn MenClothesOrder we create a new relation to ClothesTable and specify the following two:
1. Normal = ClotheId to ClotheId (Best practice to specify this on the EDT) and 
2. Related Fixed Field 0 = ClothesTable.CollecTionTypeId.
This shows that the lookup to the clothes table should show only clothes with the same ClotheId (point 1) AND clothes that are of type Men (point 2) because the table deals with order for mens’ clothes. We use 0 because Men is element 0 in the Enum.

Example 2: Fixed Field This kind works the other way round:

Imagine you have a ClothesOrders table (generic) and you have seperate tables for MenClothesTable, WomenClothesTable and ChildrenClothesTable. Fixed field says that the specified normal relation (on ClotheId) to MenClothesTable only works if the CollectionTypeId of the current record is set to 0 (Men) else the relation is disabled.
We use Fixed Field relation when we have 1:N relation. On certain condition one of the relation become active & other will remain deactivate. Let me use the same theme as MSDN – Clothing.

Lets say you have 4 tables

1. ChildernClothesTable
2. MenClothesTable
3. WomenClothesTable
4. ClothesOrdersTable

Create BaseEnum CollectionTypeId with the following elements:

0 – Men
1 – Women
2 – Children

Create Extended DataType CollectionTypeEDT of BaseEnum CollectionTypeId. Now use this EDT in your ClothesTable.

ClothesOrdersTable has the following fields:

1. ClotheId,
2. Name ,
3. CollectionTypeId and

4. Qty

ChildernClothesTable, MenClothesTable and WomenClothesTable has the following fields:
1. ClotheId,
2. Name

Case 1:

On ClothesOrdersTable we create a new relation to MenClothesTable and specify the follwing two relations:

1. Normal = ClotheId to ClotheId and

2. Fixed Field ClothesOrdersTable.CollecTionTypeId = 0 and SourceEDT = CollectionTypeEDT

This shows that the lookup to the MenClothesTable should show all clothes with the same ClotheId (Define in Normal Relation) AND clotheId will only bring from MenClothesTable as we are using type Men (Define in Fixed Field Relation) because we want to activate relationship for mens’ clothes. We use 0 because Men is element 0 in the Enum.

Case 2:

On ClothesOrdersTable we create a new relation to WomenClothesTable and specify the follwing two relations:

1. Normal = ClotheId to ClotheId and

2. Fixed Field ClothesOrdersTable.CollecTionTypeId = 1 and SourceEDT = CollectionTypeEDT

This shows that the lookup to the WomenClothesTable should show all clothes with the same ClotheId (Define in Normal Relation) AND clotheId will only bring from WomenClothesTable as we are using type Women (Define in Fixed Field Relation) because we want to activate relationship for Womens’ clothes. We use 1 because Women is element 1 in the Enum.

Case 3:

On ClothesOrdersTable we create a new relation to ChildernClothesTable and specify the follwing two relations:

1. Normal = ClotheId to ClotheId and

2. Fixed Field ClothesOrdersTable.CollecTionTypeId = 2 and SourceEDT = CollectionTypeEDT

This shows that the lookup to the ChildernClothesTable should show all clothes with the same ClotheId (Define in Normal Relation) AND clotheId will only bring from ChildernClothesTable as we are using type Childern (Define in Fixed Field Relation) because we want to activate relationship for Childern clothes. We use 2 because Childern is element 2 in the Enum.

Hope it will help you to understand Fixed field Relation in Dynamics AX………

Happy DAXing…… 🙂


XPO Link:



Other Help on PDF:





Leave a Reply

Your email address will not be published. Required fields are marked *