Hi All,
I am New to AX 2012. I have Created a custom Table(Customer Group Slab). The Data Fields are as folows:
-
CustomerGroup ( custGroup - Table Relation)
-
Service ( Item- Table Relation)
-
From Date
-
To Date
-
From Qty
-
To Qty
-
Type
-
Amount
9…
10…
…
I have created index named as SlabIdx which consists of 5 Fields ( 1 to 5). When I am Trying to assign this as Primary Index, am not able to do it. Since by default the (surrogate Key ) is assigned as Primary Key.
I have set the Allow Duplicate property to No in Index Property and set mandatory to be yes for all those primary key fields…
I want the Table to not allow duplicates for those 5 fields and need to set it as a primary key…
Kindly Suggest on this…
Thanks in Advance.
Regards,
Raj.
HI Raj,
Choose one field (which is not allowed duplicate values) and add in index then try to add as a primary index. It will work
Thanks,
Suresh
Hi Suresh,
Thanks for the Suggestion,
But in my case the data seems to be like following …
| CustGroup |
Service |
From Date |
To Date |
From Qty |
To Qty |
Type |
Amount |
| CGI |
PF |
01/04/16 |
31/03/17 |
1 |
100 |
None |
150 |
| CGI |
PF |
01/04/16 |
31/03/17 |
101 |
200 |
None |
175 |
Thanks & Regards,
Raj
HI Raj,
In those cases put surrogate key as a primary index.
Thanks,
Suresh
Hi Raj,
Not sure, what you want to achieve.
If I understand correctly, you already set the index with above 5 fields, with property Allow duplicate as NO.
That will work for you as unique index.
In table properties, Primary index, are you not getting this index in lookup?
Keep the property of “Alternatekey” → Yes