An item with the same key has already been added.

Dynamics GP eConnect may throw misleading errors if functional currency is not set up. Examples of such errors are:

  • When a purchase order is submitted, you may get the error: "An item with the same key has already been added."  
  • When an adjustment is submitted, you may get the error: "Cannot insert the value NULL into column 'EXTDCOST', table 'DATABASENAME.dbo.IV10001'; column does not allow nulls. INSERT fails. (ErrorCode: 515, ErrorState: 2, Procedure: taIVTransactionLineInsert)."
For these and other errors that do not have an apparent cause, confirm that the functional currency is set up in Dynamics GP.  The eConnect Install Administration Guide for Dynamics GP 2013 (provided by Microsoft here, click Download and select file: eConnectInstallAdminGuide.pdf) states that functional currency is required to be set up for eConnect to function properly. (Page 22)
To set the Functional Currency:
  1. In Dynamics GP, go to Microsoft Dynamics GP >> Tools >> Setup >> Financial >> Multicurrency
  2. If Functional Currency is set up, there should be a value in the Functional Currency field like Z-US$.
  3. If it is not set up, use the look up to view available options and select the appropriate currency and hit OK to save.
  4. The eConnect and Dynamics GP both recommend that Check Links is run at this point.
If the Functional Currency look up was empty:
  1. Close the Multicurrency Setup.
  2. Go to Microsoft Dynamics GP >> Tools >> Setup >> System >> Multicurrency Access.
  3. Under Currencies, select the currency you would like to be available on the Multicurrency Setup screen.
  4. For each company you would like it available for, click the Access check box to make it available.
  5. Click OK and repeat the steps above.
Have more questions? Submit a request


  • Avatar
    Arthur Achilleos

    I have had the error "An item with the same key has already been added." when an exchange rate had expired so that's one more thing to look at if your functional currency is already setup.