Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

econnect exception:"an item with same key has been already added"

Posted on by 90

We are using GP 2010 sp2/r2(11.00.1752) version.When I am processing below  xml(project accounting) to econnect.

<eConnect xmlns:dt="urn:schemas-microsoft-com:datatypes">

<PAProjectsType>

<eConnectProcessInfo>
<ProductName>V1.0</ProductName>
</eConnectProcessInfo>
 <taPAEmpExpenseLineInsert_Items>
 <taPAEmpExpenseLineInsert>
<PAertrxtype>1</PAertrxtype>
<PAerdocnumber>EE0000228</PAerdocnumber>
<EMPLOYID>DET100</EMPLOYID>
<PADT>2011-08-23T00:00:00</PADT>
<PAPROJNUMBER>CAG-REGEXP-ZU</PAPROJNUMBER>
<PACOSTCATID>BD:MEAL</PACOSTCATID>
<PAitemnumber>Lokales</PAitemnumber>
<PAQtyQ>1.000000</PAQtyQ>
<PAUNITCOST>32.180000</PAUNITCOST>
<CURNCYID>Z-US$</CURNCYID>
</taPAEmpExpenseLineInsert>
<taPAEmpExpenseLineInsert>
<PAertrxtype>1</PAertrxtype>
<PAerdocnumber>EE0000228</PAerdocnumber>
<EMPLOYID>DET100</EMPLOYID>
<PADT>2011-08-23T00:00:00</PADT>
<PAPROJNUMBER>CAG-REGEXP-ZU</PAPROJNUMBER>
<PACOSTCATID>BD:MEAL</PACOSTCATID>
<PAitemnumber>Lokales</PAitemnumber>
<PAQtyQ>1.000000</PAQtyQ>
<PAUNITCOST>32.180000</PAUNITCOST>
<CURNCYID>Z-US$</CURNCYID>
</taPAEmpExpenseLineInsert>
- <taPAEmpExpenseLineInsert>
<PAertrxtype>1</PAertrxtype>
<PAerdocnumber>EE0000228</PAerdocnumber>
<EMPLOYID>DET100</EMPLOYID>
<PADT>2011-08-23T00:00:00</PADT>
<PAPROJNUMBER>CAG-REGEXP-ZU</PAPROJNUMBER>
<PACOSTCATID>BD:MEAL</PACOSTCATID>
<PAitemnumber>Lokales</PAitemnumber>
<PAQtyQ>1.000000</PAQtyQ>
<PAUNITCOST>32.180000</PAUNITCOST>
<CURNCYID>Z-US$</CURNCYID>
</taPAEmpExpenseLineInsert>
</taPAEmpExpenseLineInsert_Items>
<taPAEmpExpenseHdrInsert>
<PAertrxtype>1</PAertrxtype>
<PAerdocnumber>EE0000228</PAerdocnumber>
<PADOCDT>2011-08-23T00:00:00</PADOCDT>
<BACHNUMB>PADBASICS101811</BACHNUMB>
<PAPD>2011-09-21T00:00:00</PAPD>
<EMPLOYID>DET100</EMPLOYID>
<PAVENADDRESSID>MAIN</PAVENADDRESSID>
<CRCRDAMT>0.000000</CRCRDAMT>
<PAStartDate>2011-08-23T00:00:00</PAStartDate>
<PAEnDate>2011-08-23T00:00:00</PAEnDate>
<PAREPTSUFF>1</PAREPTSUFF>
<CURNCYID>Z-US$</CURNCYID>
</taPAEmpExpenseHdrInsert>
</PAProjectsType>
</eConnect>
I am getting the econnect exception as below:
Exception Message: " An item with the same key has already been added".
Stack Trace:
 at Microsoft.Dynamics.GP.eConnect.ServiceProxy.CreateTransactionEntity(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.CreateTransactionEntity(String connectionString, String sXML)
    
Can any one help me to troubleshoot this issue.

 

*This post is locked for comments

  • K_G Profile Picture
    K_G 130 on at
    RE: econnect exception:"an item with same key has been already added"

    Hello,

    I am having the same issue. When I use the functional currency the transaction integrates fine, when I use a non functional currency I receive this issue. The funny thing is, the only difference is the currency. I literally change my the currency column in my data source from one currency to another and i get the message, when I change it back the transaction is successful.

    Have you tried executing the SQL stored procedures manually and seeing if you are returned any errors. I created an integration which directly executes the stored procedures, with identical values and I am able to integrate both functional and non functional currency transactions fine. I believe the problem is with the eConnect API.

    Thanks

    Kemal

  • Manikandan Profile Picture
    Manikandan 2,845 on at
    Re: econnect exception:"an item with same key has been already added"

    Hi ravi teja ,

                         Make sure that your going to create in eConnect is already in GP

    Thanks.

  • Sureshn07 Profile Picture
    Sureshn07 700 on at
    Re: econnect exception:"an item with same key has been already added"

    here you go

    community.dynamics.com/.../114721.aspx

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans