Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Error Publishing Extension Package - NAV 2017

(1) ShareShare
ReportReport
Posted on by 2,274

Hi,
I am facing an error while publishing the .navx to the NAV instance. I have upgraded a database from NAV 5.0 to 2017 and its is working fine. Then I did some customization in the upgraded database and exported these changes and deleted from the changes from the database so that i can deploy them using extensions. I am able to develop a .navx package but not able to the publish it to the service. The error is as follow:
Publish-NAVApp : An item with the same key has already been added.


Extension-Error.JPG

*This post is locked for comments

  • Verified answer
    Zaid Tariq Profile Picture
    2,274 on at
    RE: Error Publishing Extension Package - NAV 2017

    Just a small change in query: DELETE [dbo].[Object] where [Type] =0 and [Company Name] = 'ABCD'

    Use [Type] instead of Type.

    Thanks

  • Community Member Profile Picture
    on at
    RE: Error Publishing Extension Package - NAV 2017

    Thanks Zaid. It helps me a lot. I was stuck in a problem like this for a long time and this is the right solution.

  • Verified answer
    Zaid Tariq Profile Picture
    2,274 on at
    RE: Error Publishing Extension Package - NAV 2017

    I am able to solve the problem, here are the steps:
    Before start following the step let assume you have two companies first ABCD and second WXYZ

    1. Take a backup of your Database (In case something went wrong)
    2. Go to SQL Server Management Studio and select your database at which you are publishing extension.
    3. Right click on that db and select New Query.
      New-Query.png
    4. Run the following Query:
      DELETE [dbo].[Object] where [Type] =0 and [Company Name] = 'ABCD'
      *If you have more than one company, run above query for all by replacing ABCD with you company name. Repeat until only one (any of them) is left like i have deleted object for ABCD so only one compnay is left which is WXYZ in my case.
    5. Now Run the following Query:
      UPDATE [dbo].[Object] SET [Company Name] = '' WHERE [Type] = 0
    6. You are done, now Publish and Install the extension. Don't forget to like or share your feedback if this is helpful. (For more info follow my post at: www.navision360.com/.../)


  • Mohana Yadav Profile Picture
    60,232 Super User 2025 Season 1 on at
    RE: Error Publishing Extension Package - NAV 2017

    then you need to look if you have added any keys and key has same combination of fields  in another key

  • Verified answer
    Zaid Tariq Profile Picture
    2,274 on at
    RE: Error Publishing Extension Package - NAV 2017

    Well Thanks but i already had tried this.

  • Suggested answer
    Mohana Yadav Profile Picture
    60,232 Super User 2025 Season 1 on at
    RE: Error Publishing Extension Package - NAV 2017

    instead of deleting from database, can you restore new database before customizations and try to publish?

    may be you have not removed all customizations?

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics NAV (Archived)

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2

#1
mmv Profile Picture

mmv 2

#1
Amol Salvi Profile Picture

Amol Salvi 2

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans