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

Notifications

Announcements

No record found.

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,438 User Group Leader

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
    237,801 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,775 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans