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 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

I have the same question (0)
  • Suggested answer
    Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

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

    may be you have not removed all customizations?

  • Verified answer
    Zaid Tariq Profile Picture
    2,274 on at

    Well Thanks but i already had tried this.

  • Mohana Yadav Profile Picture
    61,005 Super User 2025 Season 2 on at

    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

    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/.../)


  • Community Member Profile Picture
    on at

    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

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

    Use [Type] instead of Type.

    Thanks

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

#1
HoangNam Profile Picture

HoangNam 7

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans