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 GP (Archived)

Smartconnect AA import AND An item with the same key has been added alread

(0) ShareShare
ReportReport
Posted on by

I am receiving the error "An item with the same key has been added already" when I run smartconnect integrations using the AA Distribution adapter, and map Transaction dimensions and Codes.  This happens on multiple systems and various mappings (I've tried a number of times unsuccessfully)

I can run the maps to the AA distribution node as long as I dont have dimensions or codes (I can map to the Note and Reference fields)

The techs at eone ran  my integration on their systems successfully, but were not able to help me determine the difference between my install and theirs (which tells me its more eConnect or .net or some windows thing and not Smartconnect)

Also happens on older and the newest version of Smartconnect.

Does anyone have any suggestions for troubleshooting. The eConnect Event Log didnt point to anything I could make sense of.  I get the same two errors in event fiewer:

Action: Service Create Current User Name: DOMAIN\ADMINISTRATOR Input parameters: Exception type: System.ArgumentException Exception message: An item with the same key has already been added. Stack Trace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Microsoft.Dynamics.GP.eConnect.ErrorHandler.ParseErrorCodes(String ErrorString) at Microsoft.Dynamics.GP.eConnect.ErrorHandler.GenerateExceptionFromProcErrors(String errorString, XElement transactionXmlNode, SqlConnection connection) at Microsoft.Dynamics.GP.eConnect.EntityMessageProcessor.ExecuteSqlCommands(XElement transactionNode, EntityMessage message) at Microsoft.Dynamics.GP.eConnect.eConnectMethods.ProcessMessageImport(EntityMessage message) at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction) at Microsoft.Dynamics.GP.eConnect.eConnectMethods.ProcessEntityImport(String connectionString, String sXML, Boolean isTransaction) at Microsoft.Dynamics.GP.eConnect.eConnectMethods.CreateEntity(String connectionString, String sXML) at Microsoft.Dynamics.GP.eConnect.Service.CreateEntity(String ConnectionString, String sXML)

 

Action: Create Current User Name: Input parameters: Exception type: Microsoft.Dynamics.GP.eConnect.eConnectException Exception message: An item with the same key has already been added. Stack Trace: at Microsoft.Dynamics.GP.eConnect.ServiceProxy.CreateEntity(String connectionString, String xml) at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction) at Microsoft.Dynamics.GP.eConnect.eConnectMethods.ProcessEntityImport(String connectionString, String sXML, Boolean isTransaction) at Microsoft.Dynamics.GP.eConnect.eConnectMethods.CreateEntity(String connectionString, String sXML)

 

 

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    Hi Aly

    Did you resolve this issue in the end? I'm having the same issue and about to do a re-install of smartconnect as I can't see any other resolution.

    thanks KJ

  • Community Member Profile Picture
    on at

    From all my testing I would suggest that to resolve this rather unhelpful eConnect message "An item with the same key has been added already" is to check the AA details:

    1. If the accounts do not required AA, the AA Amount column in your integration should still include an absolute amount

    2. That all accounts used in the file with AA codes are account linked (Accounting Class Link)

  • Community Member Profile Picture
    on at

    Thanks for this.

    I was getting the same error and its lack of description did not give me much hint as to the cause.  

    After reading your post I checked the accounts in the upload file and found the accountant has created some new GL accounts and included them in the upload file without adding them to the accounting class assignment.

    Saved my sanity on an integration that has been running without issue for months suddenly falling over.

  • Community Member Profile Picture
    on at

    Hi,

    I have actually solved an issue of this instance after incorrectly assuming the document type node on the taAnalyticsDistribution procedure is the same as the PM Transaction. I changed the Document Type to 0 (PM Voucher for AA), then it worked like a charm.

    Don

  • Suggested answer
    sueconrod Profile Picture
    337 on at

    it's taken me 10 years of working with SmartConnect to find the answer.  In Analytical Setup it asks you for Type.  In GL it is a zero,  in A/P it is 1.  But never had the full list.  I just found it today while doing Credit memos for AR.  

    The document number and document type values vary, depending on the type of XML document that contains the analytical accounting distribution. For example, if the analytical accounting distribution is associated with a bank receipt document, the DOCNMBR value should be the same as the CMRECNUM value of the bank receipt document. With the DOCNMBR set to the value of the bank receipt document, set the DOCTYPE value of the analytical accounting distribution to 2.

    The following table shows the document type values that can be used with a document number, based on the type of document number.

    Document number (DOCNMBR) Possible document type values (DOCTYPE)

    General Ledger (JRNENTRY) 0 = Transactions

    Bank Transaction (CMRECNUM) 3 = Credit

    4 = Withdrawal

    5 = Increase adjustment

    6 = Decrease adjustment

    Bank Receipt (CMRECNUM) 2 = Check, cash, or credit card

    RM Transaction (DOCNUMBR) 1 = Sales invoice

    3 = Debit memo

    4 = Finance charge

    5 = Service or repair

    6 = Warranty

    7 = Credit memo

    8 = Return

    9 = RM cash receipt

    PM Transaction 0 = Voucher

    1 = Payment

    SOP Transaction (SOPNUMBE) 3 = Invoice

    4 = Return

    IV Transaction (IVDOCNBR) 1 = Adjustment (increase or decrease)

    2 = Variance

    3 = Transfer

    POP Transaction (PONUMBER) 0 = Purchase order

    POP Transaction (POPRCTNM) 1 = Shipment

    2 = Enter/Match

    3 = Shipment/Invoice

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 GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans