Skip to main content

NAV 2013 & Later - An item with the same key has already been added.

Dear All,

During a upgrade process to NAV 2013 R2 from NAV 2009 SP1, i faced an issue which took a lot of time to resolve.

So i thought sharing the same with you all.

When i tired to run a page it crash the NAV 2013 Windows Client exe, I thought that page might have issues but when i run table from developer environment everything same.

The ERROR that i was getting - "An item with the same key has already been added"

Below is the Some part of Error in event viewer -

System.ArgumentException was unhandled
  HResult=-2147024809
  Message=An item with the same key has already been added.
  Source=mscorlib


Findings -
I started finding it on Google and found one of the two relevant article -

Article 1 - From Microsoft Blog specifying that the issue was resolved in NAV 2009 R2 with a Exe Fix.

Article 2 - From Microsoft Dynamics AX Blogger who specified that they have same error when they Run a Report in AX. The Reason they specified that in Report there are two fields in Report with same Name.

Analysis -

I started finding same field name in tables with same name or caption. "NOTHING Found"

Result -
Finally i found that there are multiple keys with same fields.

So if you face any issues look for duplicate keys...

Enjoy...

Regards,
Saurav Dhyani

Comments

Popular posts from this blog

VIEW SERVER STATE permission on SQL Server?

Hi all, Sometime While trying to Login into a database we face an error message as shown below. --------------------------- Microsoft Dynamics NAV Classic --------------------------- You cannot start Microsoft Dynamics NAV Classic because you do not have the VIEW SERVER STATE permission on SQL Server. Contact your system administrator. --------------------------- OK    ---------------------------

BC 21 and Higher - PowerShell Cmdlet (Replacement of Business Central Administration).

Hi Readers, As discussed in last article about deprecating of Business Central Administration, there are few common actions that we use in administration till Business Central 20. For our on-prem customers, we will still require doing activities. As Microsoft suggest we need to start using PowerShell cmdlet.    Let's see how to do those via PowerShell, or Administration Shell. I will be keep adding commands as you comment to this article.

Send Mail with Attachment From Navision.

Hi all, We have seen how to save a report into PDF and how to send mail to a customer. Let's link these two post in one i.e. Mailing statement to a customer into PDF Format. This article is part of the Series. Please Refer  Table of Content here . If you have the old objects set let me brief you what I will be changing -