Microsoft Dynamics AX Thoughts
This topic might not be new to most of you guys, but I always wondered how can I create a primary key to a Dynamics AX table?
You could easily create index in any table in Dynamics AX and you could specify that this index is “not duplicated”, which means that values of the field(s) should be unique among the table values. But this does not mean that you this index is a Primary Key index!
To create a Primary key you have to set the PrimaryIndex property in the list of that table properties.

When you choose the PrimaryIndex property you have to set that index as “not duplicated”. Once you do that, you will have the icon of that index changed to be like this:
9 Comments to “How to Create a Primary Key for a Dynamics AX Table”
Post comment
Search the site
Dynamics AX 2012 Event
Recent Posts
- Enterprise Portal is Not Working on Dynamics AX 2012 Hyper-V Image
- Dynamics Academy – An Academic Project for Microsoft Dynamics in Saudi Arabia
- Microsoft Dynamics AX 2012 Event in Khubar
- Knowledge Bridge
- Columbus IT
- Fawzi Al-Nahdi and Partners Holding Group
- Dynamics AX 2009 Shows One Line Only in Its Grids
- Talal Abu-Ghazaleh
Tags
Archives
- December 2011 (2)
- November 2011 (3)
- July 2011 (2)
- June 2011 (4)
- May 2011 (3)
- April 2011 (4)
- March 2011 (12)
- February 2011 (2)
- January 2011 (3)
- December 2010 (1)
- November 2010 (1)
- October 2010 (5)
- August 2010 (1)
- July 2010 (3)
- June 2010 (4)
- May 2010 (5)
- April 2010 (1)
- March 2010 (9)
- February 2010 (4)
- January 2010 (4)
- December 2009 (11)
- September 2009 (1)
- August 2009 (1)
- July 2009 (2)
- September 2008 (1)
Random Testimonial
- ~ Ziad Yehia, ERP Business Consultant at NetWays
"I have one thing to say about Amer,
When you have a tough Dynamics AX question that you are not able to answer; he is the person to call..." - Read more testimonials »
What's the little bird saying?
- Get a weekly doze of technology with the Microsoft Mondays Webcasts http://t.co/wyQSlYH3. This month showcases SSDT, Azure and SharePoint. 2 weeks ago
- @fawad343 Why not :)... I spent my honeymoon there.. and I would love to get back to it again! :D 3 weeks ago
- @saadalahmed تعليق بسيط... لاشيئ في العالم يسمى اسرائيل... لعلك تعني المغتصبة فلسطين؟ 3 weeks ago
- More updates...
Posting tweet...
Powered by Twitter Tools

May 31, 2010 in
June 1, 2010 at 11:27 am
Wow, this was enlightning!
To be honest, the compiler warns the developers when the table does not contain a primary index so this is something quite basic.
Tip : You can also specify this index as the clustered index on the table so that the data on SQL is physically ordered according to this index.
June 1, 2010 at 2:39 pm
Hi Kenny!
Many thanks for your post. This is quite right.
November 9, 2011 at 4:46 pm
hai,
thanks for ur poat can u send me some basic information for AIF implementation and usages..
to my mail id esriaditya@gmail.com
March 3, 2011 at 11:51 pm
This describes how to make a ‘Primary Index’ and not a ‘Primary Key’.
How do you make a ‘Primary Key’ from the AOT?
The method above will not generate a ‘Primary Key’ (KEY, not INDEX).
August 19, 2011 at 9:54 pm
This will do the job Brian – if you change a table in this manner the selected index will be propagated to SQL as the primary key.
August 20, 2011 at 8:45 am
Thank you Chris!
November 22, 2011 at 8:42 am
how i will make one particular field as a primary key…
as i i’m assigning the primary index in the table property. how the table will understand which field has primary key.
September 13, 2011 at 11:31 am
Thanks alot Mr. Amer.
November 11, 2011 at 1:39 pm
Good but we have set primary key when there an index option for not allowing duplicates