Options

Publish-NAVApp UnhandledErrorMessage

iansilversiansilvers Member Posts: 38
I have just upgraded a client database from NAV2009 to NAV2017. I am now trying to add in the Sales & Inventory Forecast extension, but when I try to publish the app using the Publish-NAVApp cmdlet, I get the error "An item with the same key has already been added"

There are no extensions installed in the database.

Any suggestions where I should be looking to resolve this?

Answers

  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,504
    Open the extension page and check whether this extension is added by default.
  • Options
    iansilversiansilvers Member Posts: 38
    The extensions management page is empty.
  • Options
    joerg_renzjoerg_renz Member Posts: 29
    Hello,
    we have this error too.
    We have upgraded a client database from NAV2009 to NAV2016 and could not publish and install any extension.
    Did you solve this error?

    Thx.
  • Options
    mohana_cse06mohana_cse06 Member Posts: 5,504
    can you share event viewer details. it mainly causes if you try to add same key in any table.
  • Options
    joerg_renzjoerg_renz Member Posts: 29
    Hello Mohana,
    Microsoft confirmed, that a technical change in the Object-Table, is the reason for this error.
    In NAV2009 for every company one record per Table-ID with type 0 ("TableData") in the Object-Table exist.
    If you have two companies, there are two records e.g. with type "TableData" and ID 3 "Payment Terms".
    In NAV2016 there is only one record with type "TableData" and ID 3 "Payment Terms" - no matter, how many companies in the database exists.
    The "wrong" records in a migrated database are the reason for the problem.

    I should receive a solution from Microsoft, how to repair the Object-Table.
  • Options
    CyberghostCyberghost Member Posts: 46
    Hi

    Did you get the fix from Microsoft?

    Cheers

    Chris
    "When you eliminate the impossible, whatever remains, however improbable, must be the truth" - Sherlock Holmes

    "God and developers are in a constant battle. Developments to make their applications more idiot-proof, and God to produce bigger idiots!"
  • Options
    joerg_renzjoerg_renz Member Posts: 29
    Hi Chris,
    I didn't got a fix from Microsoft.
    We solved this problem by updating the object table with SQL Management Studio.

    This was/is our problem:
    In Dynamics NAV 2009/2013 the development client (classic client) is being used to create new Companies. In Dynamics NAV 2013 R2, the Role Tailored Client is being used. When these companies were created via classic client, the Object table contains multiple objects per company. If you create new company in Dynamics NAV 2013 R2 and later releases, only one row is created per company.



    Example for Tabledata : Table Id =3 below from (CRONUS EXTENDED Database in NAV 2013)
    timestamp Type Company Name ID Name




    0x000000000110FB81 0 CRONUS AG 3 Payment Terms
    0x000000000110FB82 0 CRONUS EXT AG 3 Payment Terms

    If the upgrade is performed from this 2013 to Dynamics NAV 2016 and later, upgrade routine does not remove the multiple rows. After you perform full upgrade to Dynamics NAV 2016, object table contains same rows as above. In general this is not an issue, but it has consequence in other routines, which we found in several cases at partners remote deliveries and in several support request.

    CSS is not sure what other effects there are in Dynamics NAV 2016 but one example we found was during publishing NAV APP.

Sign In or Register to comment.