Based on the issue that you mentioned, I think you have some misunderstanding in RecId in Dynamics AX.
In Microsoft Dynamics AX 2012 the primary key for every new table is always enforced by an index that has exactly one field. The one field is usually an incremented number, or a completely meaningless number that is generated by the system.
For new tables the default is a primary key based on the RecId field. This is represented as the surrogate key in the user interface.
Please check the following article for more details: