web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Composite Primary Key on Table

(0) ShareShare
ReportReport
Posted on by 49,668 Super User 2026 Season 1

hi everyone, is there some way to create and assign Composite Primary key for a table in Dynamics AX 2012?? If yes how?

As i have a table (my own customized), it have 2 fields both are of string type. so i want to use these fields as composite primary key. how this could be done as ax 2012 is restricting to this

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    240,020 Most Valuable Professional on at

    If you want to follow "AX2012 way of doing", you should use SurrogateKey as PK and your composite key as a replacement key.

  • Suggested answer
    Joris dG Profile Picture
    17,782 on at

    I agree with Martin, try to keep RecId are your PK and make your composite key the replacement key. If you really need the composite key as the primary, you have to set the "allow duplicates" to "no" and the "alternatekey" to "yes" on the index. If you then save the table, then the index will be available for selection in the primaryindex property.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans