Microsoft Dynamics AX Blog
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:
Search the site
Dynamics AX 2012 Event
Recent Posts
- D365FO | Cannot Connect to SQL Server Database on Your Cloud Test Machines
- Intro to Microsoft Dynamics AX in Arabic – سلسلة حلقات مايكروسوفت داينامكس إيه إكس بالعربية
- Microsoft Dynamics Launch – Sunday, 24th February – Intercontinental Hotel, Riyadh
- Files of Our AX Brains Dec 2012 Event
- It was a great day!
- Tomorrow is the day for our Dynamics AX Brains Technical Seminar
- Dynamics AX Brains December 2012 Technical Seminar
- Windows Server 2012: Built from the Cloud Up
Tags
Archives
- October 2019 (1)
- January 2014 (1)
- February 2013 (1)
- December 2012 (4)
- September 2012 (2)
- December 2011 (2)
- November 2011 (3)
- July 2011 (3)
- 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
- ~ Mohamed Wajd Haikal, Software Team Leader at IDIS
"Amer is one of my best friends, he always tries to be the best by focusing on gaining new certifications and to have wide relationships"
- Read more testimonials »
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.
Hi Kenny!
Many thanks for your post. This is quite right.
hai,
thanks for ur poat can u send me some basic information for AIF implementation and usages..
to my mail id esriaditya@gmail.com
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).
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.
Thank you Chris!
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.
Thanks alot Mr. Amer.
Good but we have set primary key when there an index option for not allowing duplicates