Sunday, January 29, 2012

Replacement key error in Excel Add ins in AX

Q: In AX2012, while trying to import data into the table ledgerJournalTrans using Excel add-in, we're getting this error, any solution for that?

You have to specify the replacement key on the foriegn key tables of LedgerJournalTrans, basically Aif/web service displays the user friend values to the user in excel, i.e. if you want to sent the vendTransId in the LedgerJournalTrans, the user dont know about the Id, but he knows about the user friendly columns i.e. vendAccount and other transaction attributes, so it needs a replacement key that replace the foriegn key (recId) to user freindly columns.

Replacement key (pointing to an index, it can be equal to a clustered index)is a key that have columns identifying the unique record.

 Belows tables should be modified to set the Replacement key property in order to resolve this error
  •  VendTrans
  •  CustTrans
  •  Tax1099BoxDetail
  •  ReasonTableRef
  •  VendBankAccount
  •  CustBankAccount
  •  BudgetSource


  1. Dear Arsalan,

    Can you guide how to create replacement key for these table? is it possible to create index for replacement key ?


    1. Simple, you can create the index in the table and then there is a property in the table of replacment key, put that index in that key and you r fine :)

    2. is that any effect if we chose any field for the index and then put the index as replacement key??