I was wondering why this is not possible. If I add a foreign key relation to a table, the field fixed constraint is not available.
I want to store a reference to two different tables depending on an enum value. For example:
1) if TableA.VehicleType == VehicleType::Sedan then TableA.VehicleRecId = SedanTable.RecId
2) if TableA.VehicleType == VehicleType::Truck then TableA.VehicleRecId == TruckTable.RecId
Do I maybe misunderstand the purpose of a field fixed constraint?
Further I have noticed the following in standard AX implementations:
1) The ParentTableId and ParentRecId method
2) Normal relation with field fixed constraint
Which do cover the solution, but a foreign key with a field fixed constraint would be ideal.
Thanks for reading