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)

Replacement Key - Alternate

(0) ShareShare
ReportReport
Posted on by 515

HI All,

I have a table in AX 2012 and it is just designed to store some data and not used anywhere in AX(i found the AOT and no reference of this table aywhere). Just a report is pulled from this table.

The fields in this table(TEST) are item  type,item group,replace date, qty.

The table pk,clustered index is Surrogate Key and replacement index is (new index created on table with fields type,group and replace date which is als marked as Alternate key=Yes)

Problem is- when 2 different users(user id different) creates same record(item was replaced on same date) the system throws error that record already exist.

User A-TYpe(A). Group(N),Replace date-today, qty-1

UserB-Type(A),Group(N),Replace date-today, qty-1

I tried adding a new field as " Created by(properties of table-created by -Yes) in index. It allowed me to save the record with different user id. But when i was trying to add the field in index(created by) it gave me warning that adding field in key will affect the records)

Need to know if any implications will be there if i add  "Created by" in the table index.

Also dont know why replacement key is marked as  "Alternate key" by previous developers(new to AX)

Kindly reply.

*This post is locked for comments

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

    Hi NDingankar22,

    Can you tell if this is a standard or custom table? Usually when tables are used for reporting purposes, they are set to be temporary. In that scenario, each user will have an own specific instance and the data which is used on the report is then deleted automatically.

    There are certain reports which do have persistent tables. In that case, you indeed have to manage the correct split in users. The index warning will not block you now as you are adding a field in the index. When you are removing fields from an index which is not allowing duplicates, then there could be an issue.

    To be able to answer the second question, more details needs to be provided. Then it is still guessing, Can you ask the previous developers? If not try to find the documentation online and read about the theory on alternate keys.

  • NDingankar22 Profile Picture
    515 on at

    Dear Andre,

    Greetings

    Many thanks for the reply.

    It is customized table and only a report is generated(with sum of qty on that date)

    Will it be ok if I add the "Created BY" in the replacement key or will have any other implications.

    Regards

    N

  • Verified answer
    André Arnaud de Calavon Profile Picture
    301,170 Super User 2025 Season 2 on at

    You should not change the surrogate key (primary in this case) as it is a record ID which is not causing your duplicate issue. The replacement key with the fields type,group and replace date is probably set to not allow duplicates. In that case, you can extend this replacement key with the created by column.

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