foreign key and primarykey

I’m working with Dynamics ax 2012.

I’m finding a way to create foreign key with dynamics ax.

I try to create new → relation → new → foreignkey → primarykey based

I success to create this relation but when i look the database in SQLSERVER2008 i think ((the relation)) the foreign key is not create !

And about primary key !! what can i do to create my personal key other then “RecId” !!

If one day i want to import database created with SQLSERVER2008 to Dynamics AX it will be possible ? and what a way to do that ?

  1. AX2012 seems not to synchronize foreign keys with DB and handles it by its own application logic. No problem, delete actions are also not turned to triggers.
  2. Create a new index with a single field, set it as AllowDuplicates=No and AlternateKey=Yes and then it can be used as a Primary index. It may also help to look into documentation.