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

Announcements

No record found.

News and Announcements icon
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
    303,669 Super User 2026 Season 1 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
    303,669 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans