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)

Foreign key Relation in AX2012

(0) ShareShare
ReportReport
Posted on by 190

Can anyone explain about Primary key based and Single fields alternate key based Foreign key relation in AX 2012 and also its implementation.

Thanks,

Prateeksha

*This post is locked for comments

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,194 Super User 2025 Season 2 on at

    Hi Prateeksa,

    I don't understand your aim on this question, but have a look at the next MSDN page: msdn.microsoft.com/.../hh812105.aspx. IIt might help you.

  • Suggested answer
    Christian Silva Profile Picture
    707 on at

    Good day Prateeksha,

    I have recently learned about Surrogate key, Surrogate Foreing key, Surrogate key replacement fields and Alternate key. Microsoft has a white paper that helped me to understand  the theory behind it:

    www.microsoft.com/.../details.aspx

    If you are looking for a simple example I can share it with you, just let me knot it if want.

  • dolee Profile Picture
    11,279 on at

    Hi Prateeksa,

    Like Andre said, it'd be nice if you can elaborate on your question.

    On the other hand, it's MS SQL database engine behind AX2012; May be you can look at a synchronized AX DB in SSMS and see what is being created in SQL?

    Regards,

    Dominic

  • Prateeksha Profile Picture
    190 on at

    Hello All

    Thanks for the answers.

    I need a simple example on Foreign Key relation. How do we set Primary Key based  foreign key relation and Single alternate key based  foreign key relation?

  • Suggested answer
    dolee Profile Picture
    11,279 on at

    Hi,

    I was able to create both type of Foreign Key relation following the instructiosn here.

    msdn.microsoft.com/.../aa556809.aspx

    Note:

    - Primary key is the unique index specified in the Parent table PrimaryIndex property. It can consists of 1 or more fields

    - Alternate key is an unique index specified in the Parent table, with its AlternateKey property set to Yes. However, to be eligible for use for creating foreign key relation, The alternate key can only consist of a single field.

    Regards,

    Dominic

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