Hello all,
i am a new bee Dev Ax,
I want to ask about relation properties [RelatedTableCardinality] and Cardinality. I have consulted the documentation on the web.
But when I change the properties and test using the browser table, there is no change compared to normal.
I want to ask is it just MS best practice and only effect to Entity import right?
Table A
Account | String (Key) |
Name | String |
Table B
Account | String(key) |
Address | String |
Lines | Real(key) |
Thank you. I will check it
I've never seens such a warning/error regarding cardinality. If such a feature exists, it's news for me. Relations are used to ensure referential integrity, but I'm now aware of any use of cardinality properties for that.
So far, I see the value mainly in documentation. You're explicitly stating how the tables are meant to be logically related.
Try testing that how I said. Then you will see the difference.
When you give a relation to any table we will see the relation properties called cardinality and related table cardinality. These tell the d365 how to connect with another table.
For example let's think I have TableA with Vendaccount field. It has a relation to VendTable Account Num. To understand simply, the cardinality says how many records are relevant to main table.
As I said above from VendTable we are getting vend account right. That means in our table A we may have as many Vendaccounts but the source from where you are getting is VendTable Account Num where you will have unique acc nums right. Unique means exactly one account num. It means AccountNum1 is a unique account num in VendTable which has several Vendaccounts in table A. So cardinality in related table is exactly one and table A is zero more. Understood?
If in your table A if there will be only 1 or 0 accounNum1 for 1 accountNum1 in VendTable then simple we will give related as exactly one and tableA as zeroone.
Hope you understand. It just says how the source is mapped to our table fields.
For example if you require many vend accounts in your custom table and if you give cardinality as zero one and if you try to add new Accountnum in table a, it will give warning/error. So for this reason we have cardinality and related cardinality. Hope this helps.
Thank for your reply,
I tried to test to find the real difference. But when I change any of the properties, the result is the same.
But when creating composite entity, that attribute is required.
Hi,
Cardinality and Related table cardinality are nothing but notation which will show how many records are related between parent and child table.
From the above example consider Table A is parent and Table B is child - Now you are adding relation between parent and child table in child table with related field as Account.
Cardinality refers to the TableB table - It indicates that how many times Account record will exist in Table B with Account number from Table A.
Related table cardinality refers to the Table A table - It indicated that how many times Account number field exist in parent table from Account number in child table.
Cardinality will have different type as you can see from the relation properties.
For better understanding refer to the below blog.
https://dynamicsfox.com/table-cardinality-explained/
Thanks,
Girish S.
What change do you expect to see in a table browser?
To be honest, I don't know how the properties are used and I wouldn't expect anything in normal business processes.
I know that there are some best practice rules related to them, they work as documentation and I can imagine that it could be used by some reporting tools, but I don't really know.
André Arnaud de Cal...
292,031
Super User 2025 Season 1
Martin Dráb
230,868
Most Valuable Professional
nmaenpaa
101,156